39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_spi_master.h"
73#define ADC11_MAP_MIKROBUS( cfg, mikrobus ) \
74 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
75 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
76 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
77 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
adc11_return_value_t
ADC 11 Click return value data.
Definition adc11.h:132
@ ADC11_OK
Definition adc11.h:133
@ ADC11_ERROR
Definition adc11.h:134
void adc11_cfg_setup(adc11_cfg_t *cfg)
ADC 11 configuration object setup function.
err_t adc11_generic_read(adc11_t *ctx, uint16_t *adc_data)
ADC 11 data reading function.
err_t adc11_get_voltage(adc11_t *ctx, adc11_calibration_data_t *adc_val, float *voltage)
ADC 11 get voltage function.
err_t adc11_init(adc11_t *ctx, adc11_cfg_t *cfg)
ADC 11 initialization function.
err_t adc11_set_calibration(adc11_t *ctx, adc11_calibration_data_t *adc_val)
ADC 11 set calibration function.
float voltage
Definition main.c:33
uint16_t adc_data
Definition main.c:35
ADC 11 Click calibration object.
Definition adc11.h:122
uint16_t zero_adc_val
Definition adc11.h:123
ADC 11 Click configuration object.
Definition adc11.h:101
spi_master_chip_select_polarity_t cs_polarity
Definition adc11.h:113
pin_name_t sck
Definition adc11.h:106
spi_master_mode_t spi_mode
Definition adc11.h:112
pin_name_t mosi
Definition adc11.h:105
uint32_t spi_speed
Definition adc11.h:111
pin_name_t miso
Definition adc11.h:104
pin_name_t cs
Definition adc11.h:107
ADC 11 Click context object.
Definition adc11.h:87
spi_master_t spi
Definition adc11.h:90
pin_name_t chip_select
Definition adc11.h:92