ammeter 2.0.0.0
ammeter.h File Reference

This file contains API for Ammeter Click driver. More...

#include "drv_digital_out.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  ammeter_t
 Click ctx object definition. More...
 
struct  ammeter_cfg_t
 Click configuration structure definition. More...
 

Macros

#define AMMETER_MAP_MIKROBUS(cfg, mikrobus)
 
#define AMMETER_RETVAL   uint8_t
 
#define AMMETER_OK   0x00
 
#define AMMETER_INIT_ERROR   0xFF
 
#define AMMETER_SAMPLE_NUM   10
 
#define AMMETER_FILTER_USEFULL_DATA   0x1FFE
 
#define AMMETER_CALC_COEF   1024.0
 
#define AMMETER_STABULISATION_COEF   2.0
 

Functions

void ammeter_cfg_setup (ammeter_cfg_t *cfg)
 Config Object Initialization function.
 
AMMETER_RETVAL ammeter_init (ammeter_t *ctx, ammeter_cfg_t *cfg)
 Initialization function.
 
uint16_t ammeter_data_read (ammeter_t *ctx)
 Data read function.
 
uint16_t ammeter_get_raw_data (ammeter_t *ctx)
 Get raw data function.
 
float ammeter_get_avg_data (ammeter_t *ctx)
 Get average average data function.
 
float ammeter_amperage (ammeter_t *ctx)
 Get amperage function.
 

Detailed Description

This file contains API for Ammeter Click driver.