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"
66#define BOOST_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
68 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
69 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
70 cfg.cs1 = MIKROBUS( mikrobus, MIKROBUS_CS ); \
71 cfg.cs2 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
72 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST )
80#define BOOST_ERROR (-1)
87#define BOOST_CFG_VREF_BUFFERED 1
88#define BOOST_CFG_VREF_UNBUFFERED 0
90#define BOOST_CFG_GAIN_1X 1
91#define BOOST_CFG_GAIN_2X 0
93#define BOOST_CFG_POWER_OUT_ON 1
94#define BOOST_CFG_POWER_OUT_OFF 0
258 // End click Driver group
void boost_dac_setup(boost_t *ctx, boost_dac_cfg_t *cfg)
DAC Setup function.
float boost_vout_read(boost_t *ctx)
VOUT Read function.
void boost_device_enable(boost_t *ctx)
Device Enable function.
void boost_device_disable(boost_t *ctx)
Device Disable function.
void boost_cfg_setup(boost_cfg_t *cfg)
Config Object Initialization function.
err_t boost_dac_write(boost_t *ctx, uint16_t dac_val)
DAC Write function.
err_t boost_init(boost_t *ctx, boost_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition boost.h:144
pin_name_t cs1
Definition boost.h:150
pin_name_t cs2
Definition boost.h:151
spi_master_chip_select_polarity_t cs1_polarity
Definition boost.h:161
boost_dac_cfg_t dac
Definition boost.h:164
pin_name_t sck
Definition boost.h:149
spi_master_mode_t spi_mode
Definition boost.h:160
pin_name_t mosi
Definition boost.h:148
uint32_t spi_speed
Definition boost.h:159
pin_name_t en
Definition boost.h:155
pin_name_t miso
Definition boost.h:147
spi_master_chip_select_polarity_t cs2_polarity
Definition boost.h:162
Click DAC configuration structure definition.
Definition boost.h:108
uint8_t buf
Definition boost.h:109
uint8_t shdn
Definition boost.h:111
uint8_t ga
Definition boost.h:110
Click ctx object definition.
Definition boost.h:119
spi_master_t spi
Definition boost.h:130
spi_master_chip_select_polarity_t cs1_polarity
Definition boost.h:133
digital_in_t miso
Definition boost.h:126
boost_dac_cfg_t dac
Definition boost.h:136
pin_name_t chip_select2
Definition boost.h:132
digital_out_t cs1
Definition boost.h:122
digital_out_t en
Definition boost.h:124
digital_out_t cs2
Definition boost.h:123
pin_name_t chip_select1
Definition boost.h:131
spi_master_chip_select_polarity_t cs2_polarity
Definition boost.h:134