Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
37 #include "drv_spi_master.h"
64 #define THERMO21_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
65 #define THERMO21_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
83 #define THERMO21_MAP_MIKROBUS( cfg, mikrobus ) \
84 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
85 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
86 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
87 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS );
Thermo 21 Click context object.
Definition: thermo21.h:96
This file contains SPI specific macros, functions, etc.
pin_name_t chip_select
Definition: thermo21.h:100
err_t thermo21_generic_read(thermo21_t *ctx, uint8_t *data_out, uint8_t len)
Data reading function.
pin_name_t cs
Definition: thermo21.h:114
void thermo21_cfg_setup(thermo21_cfg_t *cfg)
Thermo 21 configuration object setup function.
Thermo 21 Click configuration object.
Definition: thermo21.h:108
thermo21_return_value_t
Thermo 21 Click return value data.
Definition: thermo21.h:127
pin_name_t sck
Definition: thermo21.h:113
uint32_t spi_speed
Definition: thermo21.h:117
spi_master_chip_select_polarity_t cs_polarity
Definition: thermo21.h:119
pin_name_t miso
Definition: thermo21.h:111
err_t thermo21_init(thermo21_t *ctx, thermo21_cfg_t *cfg)
Thermo 21 initialization function.
err_t thermo21_temperature_read(thermo21_t *ctx, float *data_out)
Temperature reading function.
spi_master_mode_t spi_mode
Definition: thermo21.h:118
Definition: thermo21.h:129
pin_name_t mosi
Definition: thermo21.h:112
Definition: thermo21.h:130
spi_master_t spi
Definition: thermo21.h:99