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 CHARGER9_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.flt= MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.shd= MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.chg= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
69 cfg.ful= MIKROBUS( mikrobus, MIKROBUS_INT );
76#define CHARGER9_RETVAL uint8_t
77#define CHARGER9_STATE uint8_t
79#define CHARGER9_OK 0x00
80#define CHARGER9_INIT_ERROR 0xFF
87#define CHARGER9_ENABLE 0x01
88#define CHARGER9_DISABLE 0x00
95#define CHARGER9_INVALID_STATE 0xFF
96#define CHARGER9_OK 0x00
97#define CHARGER9_IND_ACTIVE 0x00
98#define CHARGER9_IND_INACTIVE 0x01
#define CHARGER9_RETVAL
Definition charger9.h:76
#define CHARGER9_STATE
Definition charger9.h:77
void charger9_cfg_setup(charger9_cfg_t *cfg)
Config Object Initialization function.
CHARGER9_RETVAL charger9_full_charge_ind(charger9_t *ctx)
Full-Charge Indicate function.
CHARGER9_RETVAL charger9_enable(charger9_t *ctx, CHARGER9_STATE pwr_state)
Enable function.
CHARGER9_RETVAL charger9_fault_ind(charger9_t *ctx)
Fault Indicate function.
CHARGER9_RETVAL charger9_fast_charge_ind(charger9_t *ctx)
Fast-Charge Indicate function.
CHARGER9_RETVAL charger9_init(charger9_t *ctx, charger9_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition charger9.h:129
pin_name_t shd
Definition charger9.h:133
pin_name_t flt
Definition charger9.h:132
pin_name_t ful
Definition charger9.h:135
pin_name_t chg
Definition charger9.h:134
Click ctx object definition.
Definition charger9.h:112
digital_in_t flt
Definition charger9.h:119
digital_in_t chg
Definition charger9.h:120
digital_in_t ful
Definition charger9.h:121
digital_out_t shd
Definition charger9.h:115