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 SLIDER_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.oe = MIKROBUS( mikrobus, MIKROBUS_AN ); \
74 cfg.csl = MIKROBUS( mikrobus, MIKROBUS_RST )
81#define SLIDER_RETVAL uint8_t
84#define SLIDER_INIT_ERROR 0xFF
#define SLIDER_RETVAL
Definition slider.h:81
void slider_enable_output_laches(slider_t *ctx, uint8_t state)
Output laches enable function.
uint32_t slider_write_output(slider_t *ctx)
Output write function.
void slider_enable_led_output(slider_t *ctx, uint8_t state)
Output enable function.
void slider_cfg_setup(slider_cfg_t *cfg)
Config Object Initialization function.
void slider_generic_transfer(slider_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
Generic transfer function.
void slider_default_cfg(slider_t *ctx)
Click Default Configuration function.
uint32_t slider_read_adc_and_ready(slider_t *ctx)
ADC and READY read function.
SLIDER_RETVAL slider_init(slider_t *ctx, slider_cfg_t *cfg)
Initialization function.
uint32_t slider_read_adc(slider_t *ctx)
ADC read function.
Click configuration structure definition.
Definition slider.h:117
uint8_t spi_mode
Definition slider.h:133
spi_master_chip_select_polarity_t cs_polarity
Definition slider.h:134
pin_name_t sck
Definition slider.h:122
pin_name_t oe
Definition slider.h:127
pin_name_t mosi
Definition slider.h:121
uint32_t spi_speed
Definition slider.h:132
pin_name_t miso
Definition slider.h:120
pin_name_t csl
Definition slider.h:128
pin_name_t cs
Definition slider.h:123
Click ctx object definition.
Definition slider.h:98
digital_out_t cs
Definition slider.h:104
spi_master_t spi
Definition slider.h:108
digital_in_t miso
Definition slider.h:103
digital_out_t oe
Definition slider.h:101
digital_out_t csl
Definition slider.h:102
pin_name_t chip_select
Definition slider.h:109