rmeter
2.0.0.0
|
This file contains API for R Meter 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 | rmeter_t |
Click ctx object definition. More... | |
struct | rmeter_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | RMETER_MAP_MIKROBUS(cfg, mikrobus) |
#define | RMETER_RETVAL uint8_t |
#define | RMETER_OK 0x00 |
#define | RMETER_INIT_ERROR 0xFF |
#define | RMETER_SELECT 1 |
#define | RMETER_DESELECT 0 |
#define | RMETER_OVER_RANGE -1 |
#define | RMETER_FILTER_USEFULL_DATA 0x1FFE |
#define | RMETER_DATA_SAMPLE_NUM 10 |
#define | RMETER_RANGE_BASE_VALUE_0 88000 |
#define | RMETER_RANGE_BASE_VALUE_1 236 |
#define | RMETER_RANGE_BASE_VALUE_2 1100 |
#define | RMETER_RANGE_BASE_VALUE_3 95000 |
#define | RMETER_RANGE_VALUE 2000 |
#define | RMETER_RANGE_VALUE_MAX 300000 |
#define | RMETER_GAIN_CALC_CONST 100 |
Functions | |
void | rmeter_cfg_setup (rmeter_cfg_t *cfg) |
Config Object Initialization function. More... | |
RMETER_RETVAL | rmeter_init (rmeter_t *ctx, rmeter_cfg_t *cfg) |
Initialization function. More... | |
void | rmeter_range_s1 (rmeter_t *ctx, uint8_t state) |
S1 defined range function. More... | |
void | rmeter_range_s2 (rmeter_t *ctx, uint8_t state) |
S2 defined range function. More... | |
void | rmeter_range_s3 (rmeter_t *ctx, uint8_t state) |
S3 defined range function. More... | |
uint16_t | rmeter_read_data (rmeter_t *ctx) |
Data read function. More... | |
uint16_t | rmeter_get_volage (rmeter_t *ctx) |
Get voltage function. More... | |
float | rmeter_avg_volt (rmeter_t *ctx) |
Get average voltage function. More... | |
float | rmeter_calc (rmeter_t *ctx, uint32_t resFilt) |
Calculations function. More... | |
float | rmeter_get_ohms (rmeter_t *ctx) |
Get resistance in OHMs function. More... | |
This file contains API for R Meter Click driver.