currentlimit 2.0.0.0
|
This file contains API for Current Limit Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | currentlimit_t |
Current Limit Click context object. More... | |
struct | currentlimit_cfg_t |
Current Limit Click configuration object. More... | |
Macros | |
#define | CURRENTLIMIT_ENABLE 1 |
Current Limit description setting. | |
#define | CURRENTLIMIT_DISABLE 0 |
#define | CURRENTLIMIT_LSB_VAL 392.2 |
#define | CURRENTLIMIT_R_BASE 1200.0 |
#define | CURRENTLIMIT_I_MAX 1.2 |
#define | CURRENTLIMIT_CALC_COEF 1380.0 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_1 224 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_2 241 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_3 247 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_4 250 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_5 252 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_6 253 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_7 254 |
#define | CURRENTLIMIT_CUR_LIM_VAL_0_867 255 |
#define | CURRENTLIMIT_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE |
Data sample selection. | |
#define | CURRENTLIMIT_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE |
#define | CURRENTLIMIT_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | currentlimit_return_value_t { CURRENTLIMIT_OK = 0 , CURRENTLIMIT_ERROR = -1 } |
Current Limit Click return value data. More... | |
Functions | |
void | currentlimit_cfg_setup (currentlimit_cfg_t *cfg) |
Current Limit configuration object setup function. | |
err_t | currentlimit_init (currentlimit_t *ctx, currentlimit_cfg_t *cfg) |
Current Limit initialization function. | |
err_t | currentlimit_generic_write (currentlimit_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Current Limit data writing function. | |
err_t | currentlimit_generic_read (currentlimit_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Current Limit data reading function. | |
void | currentlimit_dev_enable (currentlimit_t *ctx, uint8_t state) |
Device enable function. | |
void | currentlimit_set_limit (currentlimit_t *ctx, uint8_t lim_val) |
Set Current With Predefined Values Limit function. | |
void | currentlimit_set_limit_calc (currentlimit_t *ctx, float lim_val) |
Set Calculated Current Limit function. | |
This file contains API for Current Limit Click Driver.