42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_analog_in.h"
53#include "drv_digital_in.h"
54#include "drv_spi_master.h"
66#define OZONE2_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.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
71 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN )
79#define OZONE2_INIT_ERROR (-1)
218 // End click Driver group
err_t ozone2_read_signal_voltage(ozone2_t *ctx, float *data_out)
Measurement Voltage Read function.
void ozone2_cfg_setup(ozone2_cfg_t *cfg)
Config Object Initialization function.
err_t ozone2_read_measurement(ozone2_t *ctx, uint16_t *data_out)
Measurement Read function.
err_t ozone2_init(ozone2_t *ctx, ozone2_cfg_t *cfg)
Initialization function.
ozone2_adc_sel_t
Click AD conversion type selectors.
Definition ozone2.h:93
@ OZONE2_ADC_SEL_SPI
Definition ozone2.h:95
@ OZONE2_ADC_SEL_AN
Definition ozone2.h:94
spi_master_t spi
Definition ozone2.h:111
analog_in_resolution_t resolution
Definition ozone2.h:144
float vref
Definition ozone2.h:145
ozone2_adc_sel_t adc_sel
Definition ozone2.h:116
digital_in_t miso
Definition ozone2.h:107
spi_master_chip_select_polarity_t cs_polarity
Definition ozone2.h:140
pin_name_t sck
Definition ozone2.h:129
spi_master_mode_t spi_mode
Definition ozone2.h:139
pin_name_t mosi
Definition ozone2.h:128
uint32_t spi_speed
Definition ozone2.h:138
pin_name_t miso
Definition ozone2.h:127
analog_in_t an
Definition ozone2.h:106
pin_name_t chip_select
Definition ozone2.h:112
pin_name_t an
Definition ozone2.h:134
pin_name_t cs
Definition ozone2.h:130
Click configuration structure definition.
Definition ozone2.h:124
Click ctx object definition.
Definition ozone2.h:103