42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
65#define BATTMAN_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.chg = MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.flt = MIKROBUS( mikrobus, MIKROBUS_INT )
75#define BATTMAN_RETVAL uint8_t
77#define BATTMAN_OK 0x00
78#define BATTMAN_INIT_ERROR 0xFF
#define BATTMAN_RETVAL
Definition battman.h:75
void battman_set_enable(battman_t *ctx, uint8_t state)
Enable/Disable control.
uint8_t battman_get_fault_indicator(battman_t *ctx)
Fault indicator status.
uint8_t battman_get_charging_indicator(battman_t *ctx)
Charging indicator status.
void battman_cfg_setup(battman_cfg_t *cfg)
Config Object Initialization function.
BATTMAN_RETVAL battman_init(battman_t *ctx, battman_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition battman.h:108
pin_name_t flt
Definition battman.h:113
pin_name_t en
Definition battman.h:112
pin_name_t chg
Definition battman.h:111
Click ctx object definition.
Definition battman.h:92
digital_in_t flt
Definition battman.h:100
digital_in_t chg
Definition battman.h:99
digital_out_t en
Definition battman.h:95