current9 2.1.0.0
|
This file contains API for Current 9 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 | current9_t |
Current 9 Click context object. More... | |
struct | current9_cfg_t |
Current 9 Click configuration object. More... | |
Macros | |
#define | CURRENT9_SENSITIVITY_V_TO_A 0.1333 |
Current 9 Current calculation values. | |
#define | CURRENT9_ZERO_CURRENT_OFFSET 0.500 |
#define | CURRENT9_NUM_CONVERSIONS 200 |
#define | CURRENT9_SENSOR_OUT_DIVIDER_2 2.0 |
#define | CURRENT9_90PCT_VCC 4.5 |
#define | CURRENT9_ADC_RESOLUTION 0x0FFF |
Current 9 ADC setting. | |
#define | CURRENT9_VREF_3V3 3.3 |
#define | CURRENT9_VREF_5V 5.0 |
#define | CURRENT9_SET_DEV_ADDR 0x4D |
Current 9 device address setting. | |
#define | CURRENT9_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | current9_drv_t { CURRENT9_DRV_SEL_ADC , CURRENT9_DRV_SEL_I2C } |
Current 9 Click driver selector. More... | |
enum | current9_return_value_t { CURRENT9_OK = 0 , CURRENT9_ERROR = -1 } |
Current 9 Click return value data. More... | |
Functions | |
void | current9_cfg_setup (current9_cfg_t *cfg) |
Current 9 configuration object setup function. | |
void | current9_drv_interface_selection (current9_cfg_t *cfg, current9_drv_t drv_sel) |
Current 9 driver interface setup function. | |
err_t | current9_init (current9_t *ctx, current9_cfg_t *cfg) |
Current 9 initialization function. | |
err_t | current9_read_raw_adc (current9_t *ctx, uint16_t *raw_adc) |
Current 9 read raw ADC value function. | |
err_t | current9_read_voltage (current9_t *ctx, float *voltage) |
Current 9 read voltage level function. | |
err_t | current9_set_vref (current9_t *ctx, float vref) |
Current 9 set vref function. | |
err_t | current9_read_current (current9_t *ctx, float *current) |
Current 9 read current function. | |
This file contains API for Current 9 Click Driver.
enum current9_drv_t |