41#ifdef PREINIT_SUPPORTED
45#ifdef MikroCCoreVersion
46 #if MikroCCoreVersion >= 1
51#include "drv_digital_out.h"
52#include "drv_digital_in.h"
64#define PELTIER_MAP_MIKROBUS( cfg, mikrobus ) \
65 cfg.en2= MIKROBUS( mikrobus, MIKROBUS_RST ); \
66 cfg.en1= MIKROBUS( mikrobus, MIKROBUS_CS ); \
67 cfg.chg= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
68 cfg.con= MIKROBUS( mikrobus, MIKROBUS_INT )
75#define PELTIER_RETVAL uint8_t
77#define PELTIER_OK 0x00
78#define PELTIER_INIT_ERROR 0xFF
#define PELTIER_RETVAL
Definition peltier.h:75
uint8_t peltier_battery_charge(peltier_t *ctx)
Check ongoing battery charge flag pin function.
PELTIER_RETVAL peltier_init(peltier_t *ctx, peltier_cfg_t *cfg)
Initialization function.
void peltier_disable_ldo1(peltier_t *ctx)
Disables LDO1 function.
void peltier_disable_ldo2(peltier_t *ctx)
Disables LDO2 function.
uint8_t peltier_vin_good_flag(peltier_t *ctx)
Check input voltage good flag pin function.
void peltier_cfg_setup(peltier_cfg_t *cfg)
Config Object Initialization function.
void peltier_enable_ldo2(peltier_t *ctx)
Enables LDO2 function.
void peltier_enable_ldo1(peltier_t *ctx)
Enables LDO1 function.
Click configuration structure definition.
Definition peltier.h:109
pin_name_t en2
Definition peltier.h:112
pin_name_t en1
Definition peltier.h:113
pin_name_t con
Definition peltier.h:115
pin_name_t chg
Definition peltier.h:114
Click ctx object definition.
Definition peltier.h:92
digital_out_t en2
Definition peltier.h:95
digital_out_t en1
Definition peltier.h:96
digital_in_t chg
Definition peltier.h:100
digital_in_t con
Definition peltier.h:101