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_RETVAL uint8_t |
#define | VOLTMETER_OK 0x00 |
#define | VOLTMETER_INIT_ERROR 0xFF |
#define | VOLTMETER_VALUE_5_BIT 0x001F |
#define | VOLTMETER_VALUE_12_BIT 0x0FFF |
#define | VOLTMETER_VCC_5V_COEFF_0 0 |
#define | VOLTMETER_VCC_5V_COEFF_1 1 |
#define | VOLTMETER_VCC_5V_COEFF_2 2 |
#define | VOLTMETER_VCC_5V_COEFF_VAL 5.6487 |
#define | VOLTMETER_VCC_5V_COEFFICIENT_VAL 6.1576 |
#define | VOLTMETER_VCC_5V_COEFF_PIC32_VAL 10.6857 |
Functions | |
void | voltmeter_cfg_setup (voltmeter_cfg_t *cfg) |
Config Object Initialization function. More... | |
VOLTMETER_RETVAL | voltmeter_init (voltmeter_t *ctx, voltmeter_cfg_t *cfg) |
Initialization function. More... | |
void | voltmeter_generic_transfer (voltmeter_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. More... | |
void | voltmeter_write_data (voltmeter_t *ctx, uint16_t write_data) |
Generic write the byte of the data function. More... | |
uint8_t | voltmeter_read_byte (voltmeter_t *ctx) |
Generic read the byte of the data function. More... | |
uint16_t | voltmeter_read_data (voltmeter_t *ctx) |
Generic reading 16-bit data function. More... | |
void | voltmeter_calibration (voltmeter_t *ctx) |
Calibration reading function. More... | |
float | voltmeter_get_voltage (voltmeter_t *ctx, uint8_t coefficient) |
Voltage reading function. More... | |
This file contains API for Voltmeter Click driver.