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"
60 #define THERMO25_MODE_CONTINUOUS 0x00
61 #define THERMO25_MODE_SHUTDOWN 0xFF
67 #define THERMO25_DEVICE_ID 0x900F
73 #define THERMO25_DATA_RESOLUTION 0.03125f
83 #define THERMO25_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
84 #define THERMO25_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
102 #define THERMO25_MAP_MIKROBUS( cfg, mikrobus ) \
103 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
104 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
105 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
106 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS );
pin_name_t chip_select
Definition: thermo25.h:120
pin_name_t miso
Definition: thermo25.h:133
err_t thermo25_set_mode(thermo25_t *ctx, uint8_t mode)
Thermo 25 set mode function.
spi_master_t spi
Definition: thermo25.h:118
This file contains SPI specific macros, functions, etc.
uint32_t spi_speed
Definition: thermo25.h:139
err_t thermo25_read_temperature(thermo25_t *ctx, float *temperature)
Thermo 25 read temperature function.
spi_master_chip_select_polarity_t cs_polarity
Definition: thermo25.h:141
spi_master_mode_t spi_mode
Definition: thermo25.h:140
err_t thermo25_read_data(thermo25_t *ctx, uint16_t *data_out)
Thermo 25 read data function.
pin_name_t mosi
Definition: thermo25.h:134
void thermo25_cfg_setup(thermo25_cfg_t *cfg)
Thermo 25 configuration object setup function.
Thermo 25 Click configuration object.
Definition: thermo25.h:131
@ THERMO25_ERROR
Definition: thermo25.h:152
err_t thermo25_init(thermo25_t *ctx, thermo25_cfg_t *cfg)
Thermo 25 initialization function.
Thermo 25 Click context object.
Definition: thermo25.h:116
thermo25_return_value_t
Thermo 25 Click return value data.
Definition: thermo25.h:150
err_t thermo25_check_communication(thermo25_t *ctx)
Thermo 25 check communication function.
@ THERMO25_OK
Definition: thermo25.h:151
uint8_t dev_mode
Definition: thermo25.h:122
pin_name_t cs
Definition: thermo25.h:136
pin_name_t sck
Definition: thermo25.h:135