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 BUCK3_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.en= MIKROBUS( mikrobus, MIKROBUS_RST ); \
67 cfg.pgd= MIKROBUS( mikrobus, MIKROBUS_CS );
74#define BUCK3_RETVAL uint8_t
77#define BUCK3_INIT_ERROR 0xFF
84#define BUCK3_MODE_ACTIVE 0x01
85#define BUCK3_MODE_SLEEP 0x00
#define BUCK3_RETVAL
Definition buck3.h:74
void buck3_default_cfg(buck3_t *ctx)
Click Default Configuration function.
void buck3_cfg_setup(buck3_cfg_t *cfg)
Config Object Initialization function.
void buck3_set_device_state(buck3_t *ctx, uint8_t state)
Function for setting chip mode.
uint8_t buck3_get_power_good(buck3_t *ctx)
Function reads state of PGD pin.
BUCK3_RETVAL buck3_init(buck3_t *ctx, buck3_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition buck3.h:114
pin_name_t pgd
Definition buck3.h:118
pin_name_t en
Definition buck3.h:117
Click ctx object definition.
Definition buck3.h:99
digital_in_t pgd
Definition buck3.h:106
digital_out_t en
Definition buck3.h:102