42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_i2c_master.h"
63#define THERMO4_MAP_MIKROBUS( cfg, mikrobus ) \
64 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
65 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
66 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
73#define THERMO4_RETVAL uint8_t
75#define THERMO4_OK 0x00
76#define THERMO4_INIT_ERROR 0xFF
#define THERMO4_RETVAL
Definition thermo4.h:73
void thermo4_read_data(thermo4_t *ctx, uint8_t reg, uint16_t *data_out)
Data read function.
float thermo4_read_temperature_c(thermo4_t *ctx)
Read Temperature in Celsius function.
float thermo4_read_temperature_f(thermo4_t *ctx)
Read Temperature in Fahrenheit function.
void thermo4_write_cfg(thermo4_t *ctx, uint8_t wr_cfg)
Write configuration function.
void thermo4_power_up(thermo4_t *ctx)
Power up function.
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_write_over_temp_shut_down(thermo4_t *ctx, float input_val)
Write overtemperature shutdown threshold function.
uint8_t thermo4_read_cfg(thermo4_t *ctx)
Read configuration function.
float thermo4_read_over_temp_shut_down(thermo4_t *ctx)
Read overtemperature shutdown threshold function.
void thermo4_default_cfg(thermo4_t *ctx)
Click Default Configuration function.
void thermo4_write_temp_hyst(thermo4_t *ctx, float input_val)
Write hysteresis function.
float thermo4_read_temp_hyst(thermo4_t *ctx)
Read hysteresis function.
void thermo4_shut_down(thermo4_t *ctx)
Read configuration function.
void thermo4_write_byte(thermo4_t *ctx, uint8_t reg, uint8_t data_in)
Byte write function.
void thermo4_reset(thermo4_t *ctx)
Reset function.
float thermo4_read_temperature_k(thermo4_t *ctx)
Read Temperature in Kelvin function.
void thermo4_cfg_setup(thermo4_cfg_t *cfg)
Config Object Initialization function.
THERMO4_RETVAL thermo4_init(thermo4_t *ctx, thermo4_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition thermo4.h:110
uint32_t i2c_speed
Definition thermo4.h:122
pin_name_t scl
Definition thermo4.h:113
pin_name_t int_pin
Definition thermo4.h:118
pin_name_t sda
Definition thermo4.h:114
uint8_t i2c_address
Definition thermo4.h:123
Click ctx object definition.
Definition thermo4.h:90
digital_in_t int_pin
Definition thermo4.h:94
i2c_master_t i2c
Definition thermo4.h:98
uint8_t slave_address
Definition thermo4.h:102