Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
40 #include "drv_i2c_master.h"
49 #define THERMO4_MAP_MIKROBUS( cfg, mikrobus ) \
50 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
51 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
52 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
59 #define THERMO4_RETVAL uint8_t
61 #define THERMO4_OK 0x00
62 #define THERMO4_INIT_ERROR 0xFF
327 #endif // _THERMO4_H_
float thermo4_read_temperature_c(thermo4_t *ctx)
Read Temperature in Celsius function.
void thermo4_power_up(thermo4_t *ctx)
Power up function.
uint8_t thermo4_read_cfg(thermo4_t *ctx)
Read configuration function.
uint32_t i2c_speed
Definition: thermo4.h:108
void thermo4_read_byte(thermo4_t *ctx, uint8_t reg, uint8_t *data_out)
Byte read function.
void thermo4_write_data(thermo4_t *ctx, uint8_t reg, uint16_t data_in)
Data write function.
void thermo4_reset(thermo4_t *ctx)
Reset function.
void thermo4_read_data(thermo4_t *ctx, uint8_t reg, uint16_t *data_out)
Data read function.
float thermo4_read_over_temp_shut_down(thermo4_t *ctx)
Read overtemperature shutdown threshold function.
void thermo4_cfg_setup(thermo4_cfg_t *cfg)
Config Object Initialization function.
Click ctx object definition.
Definition: thermo4.h:75
Click configuration structure definition.
Definition: thermo4.h:95
pin_name_t sda
Definition: thermo4.h:100
i2c_master_t i2c
Definition: thermo4.h:84
#define THERMO4_RETVAL
Definition: thermo4.h:59
pin_name_t scl
Definition: thermo4.h:99
float thermo4_read_temperature_f(thermo4_t *ctx)
Read Temperature in Fahrenheit function.
uint8_t i2c_address
Definition: thermo4.h:109
float thermo4_read_temp_hyst(thermo4_t *ctx)
Read hysteresis function.
void thermo4_write_cfg(thermo4_t *ctx, uint8_t wr_cfg)
Write configuration function.
float thermo4_read_temperature_k(thermo4_t *ctx)
Read Temperature in Kelvin function.
digital_in_t int_pin
Definition: thermo4.h:80
void thermo4_write_byte(thermo4_t *ctx, uint8_t reg, uint8_t data_in)
Byte write function.
void thermo4_write_temp_hyst(thermo4_t *ctx, float input_val)
Write hysteresis function.
THERMO4_RETVAL thermo4_init(thermo4_t *ctx, thermo4_cfg_t *cfg)
Initialization function.
uint8_t slave_address
Definition: thermo4.h:88
pin_name_t int_pin
Definition: thermo4.h:104
void thermo4_shut_down(thermo4_t *ctx)
Read configuration function.
void thermo4_default_cfg(thermo4_t *ctx)
Click Default Configuration function.
void thermo4_write_over_temp_shut_down(thermo4_t *ctx, float input_val)
Write overtemperature shutdown threshold function.