voltmeter 2.0.0.0
|
This file contains API for Voltmeter Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | voltmeter_t |
Click ctx object definition. More... | |
struct | voltmeter_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | VOLTMETER_MAP_MIKROBUS(cfg, mikrobus) |
#define | VOLTMETER_OK 0 |
#define | VOLTMETER_ERROR -1 |
#define | VOLTMETER_DATA_RESOLUTION 0x0FFF |
#define | VOLTMETER_VREF_ISOLATED_GND 17.05f |
#define | VOLTMETER_VREF_SHARED_GND 8.525f |
#define | VOLTMETER_NUM_ADC_CONVERSIONS 100 |
#define | VOLTMETER_DATA_OFFSET 15 |
#define | VOLTMETER_GND_ISO 1 |
#define | VOLTMETER_GND_SHARED 0 |
Functions | |
void | voltmeter_cfg_setup (voltmeter_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | voltmeter_init (voltmeter_t *ctx, voltmeter_cfg_t *cfg) |
Initialization function. | |
int16_t | voltmeter_read_raw_data (voltmeter_t *ctx) |
Read raw ADC value function. | |
float | voltmeter_calculate_voltage (voltmeter_t *ctx, int16_t raw_adc, uint8_t iso_gnd) |
Voltage calculation function. | |
This file contains API for Voltmeter Click driver.