amrcurent 2.0.0.0
amrcurrent.h File Reference

This file contains API for AMR Current Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  amrcurent_t
 Click ctx object definition. More...
 
struct  amrcurent_cfg_t
 Click configuration structure definition. More...
 

Macros

#define AMRCURENT_MAP_MIKROBUS(cfg, mikrobus)
 
#define AMRCURENT_RETVAL   uint8_t
 
#define AMRCURENT_OK   0x00
 
#define AMRCURENT_INIT_ERROR   0xFF
 
#define AMRCURRENT_PIN_STATE_HIGH   1
 
#define AMRCURRENT_PIN_STATE_LOW   0
 

Functions

void amrcurent_cfg_setup (amrcurent_cfg_t *cfg)
 Config Object Initialization function.
 
AMRCURENT_RETVAL amrcurent_init (amrcurent_t *ctx, amrcurent_cfg_t *cfg)
 Initialization function.
 
void amrcurent_default_cfg (amrcurent_t *ctx)
 Click Default Configuration function.
 
void amrcurent_generic_write (amrcurent_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void amrcurent_generic_read (amrcurent_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint16_t amrcurrent_read_value (amrcurent_t *ctx)
 Reads ADC current data.
 
uint8_t amrcurrent_get_int_pin_state (amrcurent_t *ctx)
 Gets state of the FLTB pin on int.
 
void amrcurrent_set_rst_pin_state (amrcurent_t *ctx, uint8_t pin_state)
 Sets state of the reset pin.
 
void amrcurrent_hw_reset (amrcurent_t *ctx)
 Hardware reset device.
 
float amrcurrent_get_current (amrcurent_t *ctx)
 Reads current data in mA.
 

Detailed Description

This file contains API for AMR Current Click driver.