42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_analog_in.h"
53#include "drv_spi_master.h"
65#define UV_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
67 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
68 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
69 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
70 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
71 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST )
err_t uv_read_adc_voltage(uv_t *ctx, float *data_out)
ADC Voltage Reading function.
err_t uv_read_an_pin_voltage(uv_t *ctx, float *data_out)
AN Pin Voltage Reading function.
void uv_device_enable(uv_t *ctx)
Device Power ON function.
err_t uv_read_adc_value(uv_t *ctx, uint16_t *data_out)
ADC Reading function.
void uv_calc_index(uv_t *ctx, float data_in, uint8_t *data_out)
UV Index Calculation function.
void uv_cfg_setup(uv_cfg_t *cfg)
Config Object Initialization function.
void uv_set_callback_handler(uv_t *ctx, uv_callback_t handler)
Callback Handler Setting function.
err_t uv_read_an_pin_value(uv_t *ctx, uint16_t *data_out)
AN Pin Reading function.
void uv_device_disable(uv_t *ctx)
Device Power OFF function.
err_t uv_init(uv_t *ctx, uv_cfg_t *cfg)
Initialization function.
void(* uv_callback_t)(uint8_t *)
Click callback handler definition.
Definition uv.h:84
Click configuration structure definition.
Definition uv.h:110
analog_in_resolution_t resolution
Definition uv.h:126
float vref_value
Definition uv.h:127
spi_master_chip_select_polarity_t cs_polarity
Definition uv.h:124
pin_name_t sck
Definition uv.h:114
spi_master_mode_t spi_mode
Definition uv.h:123
pin_name_t mosi
Definition uv.h:113
uint32_t spi_speed
Definition uv.h:122
pin_name_t en
Definition uv.h:119
pin_name_t miso
Definition uv.h:112
pin_name_t an
Definition uv.h:118
pin_name_t cs
Definition uv.h:115
Click context object definition.
Definition uv.h:90
spi_master_t spi
Definition uv.h:98
uv_callback_t handler
Definition uv.h:102
digital_out_t en
Definition uv.h:92
analog_in_t an
Definition uv.h:95
pin_name_t chip_select
Definition uv.h:99