charger5 2.0.0.0
charger5.h File Reference

This file contains API for Charger 5 Click driver. More...

#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  charger5_t
 Click context object definition. More...
 
struct  charger5_cfg_t
 Click configuration structure definition. More...
 

Macros

#define CHARGER5_RETVAL   uint8_t
 
#define CHARGER5_OK   0x00
 
#define CHARGER5_INIT_ERROR   0xFF
 
#define CHARGER5_REG_WIPER0_VOL   0x00
 
#define CHARGER5_REG_WIPER1_VOL   0x01
 
#define CHARGER5_REG_WIPER0_NONVOL   0x02
 
#define CHARGER5_REG_WIPER1_NONVOL   0x03
 
#define CHARGER5_REG_TCONTROL_VOL   0x04
 
#define CHARGER5_REG_STATUS_VOL   0x05
 
#define CHARGER5_REG_DATA_EEPROM0   0x06
 
#define CHARGER5_REG_DATA_EEPROM1   0x07
 
#define CHARGER5_REG_DATA_EEPROM2   0x08
 
#define CHARGER5_REG_DATA_EEPROM3   0x09
 
#define CHARGER5_REG_DATA_EEPROM4   0x0A
 
#define CHARGER5_REG_DATA_EEPROM5   0x0B
 
#define CHARGER5_REG_DATA_EEPROM6   0x0C
 
#define CHARGER5_REG_DATA_EEPROM7   0x0D
 
#define CHARGER5_REG_DATA_EEPROM8   0x0E
 
#define CHARGER5_REG_DATA_EEPROM9   0x0F
 
#define CHARGER5_CURRENT_100MA_MIN   0x00
 
#define CHARGER5_CURRENT_200MA   0x88
 
#define CHARGER5_CURRENT_300MA   0xBD
 
#define CHARGER5_CURRENT_400MA   0xD6
 
#define CHARGER5_CURRENT_500MA   0xE4
 
#define CHARGER5_CURRENT_600MA   0xEE
 
#define CHARGER5_CURRENT_700MA   0xF5
 
#define CHARGER5_CURRENT_800MA   0xFB
 
#define CHARGER5_CURRENT_900MA   0xFE
 
#define CHARGER5_CURRENT_950MA_MAX   0x0100
 
#define CHARGER5_STEPS_1_MIN   0x01
 
#define CHARGER5_STEPS_2   0x02
 
#define CHARGER5_STEPS_5   0x05
 
#define CHARGER5_STEPS_10   0x0A
 
#define CHARGER5_STEPS_50   0x32
 
#define CHARGER5_STEPS_100   0x64
 
#define CHARGER5_STEPS_150   0x96
 
#define CHARGER5_STEPS_200   0xC8
 
#define CHARGER5_STEPS_255_MAX   0xFF
 
#define CHARGER5_MAP_MIKROBUS(cfg, mikrobus)
 

Enumerations

enum  charger5_err_t { CHARGER5_STATUS_OK , CHARGER5_STATUS_ERROR , CHARGER5_MODULE_INIT_ERROR , CHARGER5_NSTEPS_RANGE_ERROR }
 Click error code definition. More...
 

Functions

void charger5_cfg_setup (charger5_cfg_t *cfg)
 Configuration Object Setup function.
 
charger5_err_t charger5_init (charger5_t *ctx, charger5_cfg_t *cfg)
 Click Initialization function.
 
void charger5_default_cfg (charger5_t *ctx)
 Click Default Configuration function.
 
charger5_err_t charger5_generic_write (charger5_t *ctx, uint8_t reg_addr, uint16_t transfer_data)
 Generic Write function.
 
uint16_t charger5_generic_read (charger5_t *ctx, uint8_t reg_addr)
 Generic Read function.
 
charger5_err_t charger5_increment_wiper (charger5_t *ctx, uint8_t reg_addr, uint8_t n_steps)
 Increment Wiper function.
 
charger5_err_t charger5_decrement_wiper (charger5_t *ctx, uint8_t reg_addr, uint8_t n_steps)
 Decrement Wiper function.
 

Detailed Description

This file contains API for Charger 5 Click driver.