42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_spi_master.h"
67#define BOOST4_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
69 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
70 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
71 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
72 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST )
79#define BOOST4_RETVAL uint8_t
82#define BOOST4_INIT_ERROR 0xFF
89#define BOOST4_START_CMD 0x70
91#define BOOST4_VOUT_MIN 1500
92#define BOOST4_VOUT_2_5 1330
93#define BOOST4_VOUT_3 1085
94#define BOOST4_VOUT_3_5 840
95#define BOOST4_VOUT_4 595
96#define BOOST4_VOUT_4_5 350
97#define BOOST4_VOUT_5 105
98#define BOOST4_VOUT_MAX 0
100#define BOOST4_12_BIT 0x0FFF
101#define BOOST4_ENABLE 1
102#define BOOST4_DISABLE 0
#define BOOST4_RETVAL
Definition boost4.h:79
void boost4_set_out_voltage(boost4_t *ctx, uint16_t value)
Set output voltage function.
BOOST4_RETVAL boost4_init(boost4_t *ctx, boost4_cfg_t *cfg)
Initialization function.
void boost4_cfg_setup(boost4_cfg_t *cfg)
Config Object Initialization function.
void boost4_enable(boost4_t *ctx, uint8_t state)
Enable device function.
Click configuration structure definition.
Definition boost4.h:133
spi_master_chip_select_polarity_t cs_polarity
Definition boost4.h:150
pin_name_t sck
Definition boost4.h:138
spi_master_mode_t spi_mode
Definition boost4.h:149
pin_name_t mosi
Definition boost4.h:137
uint32_t spi_speed
Definition boost4.h:148
pin_name_t en
Definition boost4.h:143
pin_name_t miso
Definition boost4.h:136
pin_name_t cs
Definition boost4.h:139
Click ctx object definition.
Definition boost4.h:116
digital_out_t cs
Definition boost4.h:120
spi_master_t spi
Definition boost4.h:124
digital_out_t en
Definition boost4.h:119
pin_name_t chip_select
Definition boost4.h:125