39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
67#define CHARGER26_PIN_STATE_HIGH 0x01
68#define CHARGER26_PIN_STATE_LOW 0x00
74#define CHARGER26_SELV_4V1_REG_POINT 0x00
75#define CHARGER26_SELV_4V2_REG_POINT 0x01
81#define CHARGER26_SELI_100_MA_MAX_REG 0x00
82#define CHARGER26_SELI_500_MA_MAX_REG 0x01
88#define CHARGER26_ENABLE_OUTPUT 0x01
89#define CHARGER26_DISABLE_OUTPUT 0x00
108#define CHARGER26_MAP_MIKROBUS( cfg, mikrobus ) \
109 cfg.vsel = MIKROBUS( mikrobus, MIKROBUS_AN ); \
110 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
111 cfg.isel = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
112 cfg.chg = MIKROBUS( mikrobus, MIKROBUS_INT )
charger26_return_value_t
Charger 26 Click return value data.
Definition charger26.h:149
@ CHARGER26_ERROR
Definition charger26.h:151
@ CHARGER26_OK
Definition charger26.h:150
void charger26_enable_output(charger26_t *ctx, uint8_t output_state)
Charger 26 enable charger output function.
uint8_t charger26_get_chg_state(charger26_t *ctx)
Charger 26 chg pin reading function.
void charger26_set_vsel(charger26_t *ctx, uint8_t vout_sel)
Charger 26 select charger voltage function.
err_t charger26_init(charger26_t *ctx, charger26_cfg_t *cfg)
Charger 26 initialization function.
void charger26_cfg_setup(charger26_cfg_t *cfg)
Charger 26 configuration object setup function.
void charger26_default_cfg(charger26_t *ctx)
Charger 26 default configuration function.
void charger26_set_isel(charger26_t *ctx, uint8_t iout_sel)
Charger 26 select charger current function.
Charger 26 Click configuration object.
Definition charger26.h:136
pin_name_t vsel
Definition charger26.h:137
pin_name_t en
Definition charger26.h:138
pin_name_t isel
Definition charger26.h:139
pin_name_t chg
Definition charger26.h:140
Charger 26 Click context object.
Definition charger26.h:122
digital_out_t vsel
Definition charger26.h:123
digital_out_t isel
Definition charger26.h:125
digital_in_t chg
Definition charger26.h:127
digital_out_t en
Definition charger26.h:124