41#ifdef PREINIT_SUPPORTED
45#ifdef MikroCCoreVersion
46 #if MikroCCoreVersion >= 1
51#include "drv_digital_out.h"
52#include "drv_analog_in.h"
65#define SHTAN_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
err_t shtan_init(shtan_t *ctx, shtan_cfg_t *cfg)
Initialization function.
err_t shtan_read_adc(shtan_t *ctx, uint16_t *data_out)
ADC read function.
void shtan_reset(shtan_t *ctx)
Hardware reset function.
void shtan_cfg_setup(shtan_cfg_t *cfg)
Config Object Initialization function.
void shtan_set_mode(shtan_t *ctx, shtan_adc_mode_t sel)
Set ADC mode function.
err_t shtan_read_an_voltage(shtan_t *ctx, float *data_out)
AN voltage read function.
err_t shtan_meas_temperature(shtan_t *ctx, float *data_out, shtan_temp_mode_t sel)
Temperature measure function.
err_t shtan_meas_humidity(shtan_t *ctx, float *data_out)
Humidity measure function.
shtan_temp_mode_t
Click temperature unit mode descriptors.
Definition shtan.h:92
shtan_adc_mode_t
Click adc mode descriptors.
Definition shtan.h:82
@ SHTAN_SET_TEMP_MODE_DEG_C
Definition shtan.h:93
@ SHTAN_SET_TEMP_MODE_DEG_F
Definition shtan.h:94
@ SHTAN_SET_ADC_MODE_HUM
Definition shtan.h:84
@ SHTAN_SET_ADC_MODE_TEMP
Definition shtan.h:83
Click configuration structure definition.
Definition shtan.h:120
analog_in_resolution_t resolution
Definition shtan.h:132
float vref
Definition shtan.h:133
float vdd
Definition shtan.h:134
pin_name_t rst
Definition shtan.h:127
pin_name_t an
Definition shtan.h:123
pin_name_t cs
Definition shtan.h:128
Click ctx object definition.
Definition shtan.h:102
digital_out_t cs
Definition shtan.h:106
float vdd
Definition shtan.h:108
digital_out_t rst
Definition shtan.h:105
analog_in_t adc
Definition shtan.h:112