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_analog_in.h"
67#define SLIDER2_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.an_pin = MIKROBUS( mikrobus, MIKROBUS_AN ); \
69 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
70 cfg.rsl = MIKROBUS( mikrobus, MIKROBUS_PWM )
77#define SLIDER2_RETVAL uint8_t
79#define SLIDER2_OK 0x00
80#define SLIDER2_INIT_ERROR 0xFF
87#define SLIDER2_DEVICE_ENABLE 1
88#define SLIDER2_DEVICE_DISABLE 0
95#define SLIDER2_MAX_VOLTAGE_2_048V 1
96#define SLIDER2_MAX_VOLTAGE_4_096V 0
#define SLIDER2_RETVAL
Definition slider2.h:77
void slider2_enable(slider2_t *ctx, uint8_t state)
Setting state function.
void slider2_cfg_setup(slider2_cfg_t *cfg)
Config Object Initialization function.
void slider2_default_cfg(slider2_t *ctx)
Click Default Configuration function.
SLIDER2_RETVAL slider2_init(slider2_t *ctx, slider2_cfg_t *cfg)
Initialization function.
slider2_data_t slider2_generic_read(slider2_t *ctx)
Generic read function.
void slider2_set_reference(slider2_t *ctx, uint8_t ref)
Setting reference function.
uint16_t slider2_data_t
Analog data type.
Definition slider2.h:109
Click configuration structure definition.
Definition slider2.h:131
analog_in_resolution_t resolution
Definition slider2.h:143
float vref
Definition slider2.h:144
pin_name_t an_pin
Definition slider2.h:134
pin_name_t en
Definition slider2.h:138
pin_name_t rsl
Definition slider2.h:139
Click ctx object definition.
Definition slider2.h:115
digital_out_t en
Definition slider2.h:118
digital_out_t rsl
Definition slider2.h:119
analog_in_t adc
Definition slider2.h:123