current11
2.1.0.0
|
This file contains API for Current 11 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_analog_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | current11_t |
Current 11 Click context object. More... | |
struct | current11_cfg_t |
Current 11 Click configuration object. More... | |
Macros | |
#define | CURRENT11_SENSITIVITY_V_G 0.006f |
Current 11 Current calculation values. More... | |
#define | CURRENT11_COUPLING_FACTOR_G_A 4.66f |
#define | CURRENT11_NUM_CONVERSIONS 200 |
#define | CURRENT11_SENSOR_OUT_DIVIDER_2 2.0f |
#define | CURRENT11_SENSOR_VREF 2.5f |
#define | CURRENT11_ADC_RESOLUTION 0x0FFF |
Current 11 ADC setting. More... | |
#define | CURRENT11_VREF_3V3 3.3f |
#define | CURRENT11_VREF_5V 5.0f |
#define | CURRENT11_SET_DEV_ADDR 0x4D |
Current 11 device address setting. More... | |
#define | CURRENT11_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. More... | |
Enumerations | |
enum | current11_drv_t { CURRENT11_DRV_SEL_ADC, CURRENT11_DRV_SEL_I2C } |
Current 11 Click driver selector. More... | |
enum | current11_return_value_t { CURRENT11_OK = 0, CURRENT11_ERROR = -1 } |
Current 11 Click return value data. More... | |
Functions | |
void | current11_cfg_setup (current11_cfg_t *cfg) |
Current 11 configuration object setup function. More... | |
void | current11_drv_interface_sel (current11_cfg_t *cfg, current11_drv_t drv_sel) |
Current 11 driver interface setup function. More... | |
err_t | current11_init (current11_t *ctx, current11_cfg_t *cfg) |
Current 11 initialization function. More... | |
err_t | current11_read_raw_adc (current11_t *ctx, uint16_t *raw_adc) |
Current 11 read raw ADC value function. More... | |
err_t | current11_read_voltage (current11_t *ctx, float *voltage) |
Current 11 read voltage level function. More... | |
err_t | current11_set_vref (current11_t *ctx, float vref) |
Current 11 set vref function. More... | |
err_t | current11_calibrate_offset (current11_t *ctx) |
Current 11 calibrate offset function. More... | |
err_t | current11_read_current (current11_t *ctx, float *current) |
Current 11 read current function. More... | |
This file contains API for Current 11 Click Driver.
enum current11_drv_t |