current5 2.0.0.0
|
This file contains API for Current 5 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 | current5_t |
Current 5 Click context object. More... | |
struct | current5_cfg_t |
Current 5 Click configuration object. More... | |
Macros | |
#define | CURRENT5_VOLTAGE_GAIN 200.0 |
Current 5 current calculation values. | |
#define | CURRENT5_VREF_mV 3300.0 |
#define | CURRENT5_RESOLUTION 4096.0 |
#define | CURRENT5_RSHUNT_mOHM 2.0 |
#define | CURRENT5_GAIN_ERROR_PERCENTS 6.0 |
#define | CURRENT5_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE |
Data sample selection. | |
#define | CURRENT5_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE |
#define | CURRENT5_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | current5_return_value_t { CURRENT5_OK = 0 , CURRENT5_ERROR = -1 } |
Current 5 Click return value data. More... | |
Functions | |
void | current5_cfg_setup (current5_cfg_t *cfg) |
Current 5 configuration object setup function. | |
err_t | current5_init (current5_t *ctx, current5_cfg_t *cfg) |
Current 5 initialization function. | |
err_t | current5_default_cfg (current5_t *ctx) |
Current 5 default configuration function. | |
err_t | current5_generic_read (current5_t *ctx, uint8_t *data_out, uint8_t len) |
Current 5 data reading function. | |
uint8_t | current5_get_alert (current5_t *ctx) |
Get alert pin state. | |
void | current5_set_rst (current5_t *ctx, uint8_t state) |
Mode selection. | |
err_t | current5_get_adc (current5_t *ctx, uint16_t *adc_data) |
Read raw adc value. | |
err_t | current5_get_voltage (current5_t *ctx, float *vout) |
Get voltage. | |
err_t | current5_get_current (current5_t *ctx, float *current) |
Get current. | |
This file contains API for Current 5 Click Driver.