42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_spi_master.h"
68#define BUCK13_MAP_MIKROBUS( cfg, mikrobus ) \
69 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
70 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
71 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
72 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
73 cfg.en = MIKROBUS( mikrobus, MIKROBUS_AN );
80#define BUCK13_RETVAL uint8_t
83#define BUCK13_INIT_ERROR 0xFF
90#define BUCK13_ENABLE 1
91#define BUCK13_DISABLE 0
#define BUCK13_RETVAL
Definition buck13.h:80
void buck13_generic_transfer(buck13_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
Generic transfer function.
uint16_t buck13_get_voltage(buck13_t *ctx)
Get voltage function.
void buck13_default_cfg(buck13_t *ctx)
Click Default Configuration function.
void buck13_enable(buck13_t *ctx, uint8_t pwr_state)
Enable Buck13 function.
uint16_t buck13_get_adc(buck13_t *ctx)
Get ADC function.
void buck13_cfg_setup(buck13_cfg_t *cfg)
Config Object Initialization function.
BUCK13_RETVAL buck13_init(buck13_t *ctx, buck13_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition buck13.h:121
spi_master_chip_select_polarity_t cs_polarity
Definition buck13.h:137
pin_name_t sck
Definition buck13.h:126
spi_master_mode_t spi_mode
Definition buck13.h:136
pin_name_t mosi
Definition buck13.h:125
uint32_t spi_speed
Definition buck13.h:135
pin_name_t en
Definition buck13.h:131
pin_name_t miso
Definition buck13.h:124
pin_name_t cs
Definition buck13.h:127
Click ctx object definition.
Definition buck13.h:104
digital_out_t cs
Definition buck13.h:108
spi_master_t spi
Definition buck13.h:112
digital_out_t en
Definition buck13.h:107
pin_name_t chip_select
Definition buck13.h:113