39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_i2c_master.h"
74#define IRTHERMO5V_SET_DEV_ADDR 0x5A
92#define IRTHERMO5V_MAP_MIKROBUS( cfg, mikrobus ) \
93 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
94 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
95 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
void irthermo5v_cfg_setup(irthermo5v_cfg_t *cfg)
IrThermo 5V configuration object setup function.
err_t irthermo5v_init(irthermo5v_t *ctx, irthermo5v_cfg_t *cfg)
IrThermo 5V initialization function.
uint16_t irthermo5v_read_reg(irthermo5v_t *ctx, uint8_t address)
Generic function for reading values from RAM.
float irthermo5v_get_t_object(irthermo5v_t *ctx)
Reads Temperature object1 from sensor.
float irthermo5v_get_t_ambient(irthermo5v_t *ctx)
Reads Temperature ambient from sensor.
irthermo5v_return_value_t
IrThermo 5V Click return value data.
Definition irthermo5v.h:139
@ IRTHERMO5V_OK
Definition irthermo5v.h:140
@ IRTHERMO5V_ERROR
Definition irthermo5v.h:141
IrThermo 5V Click configuration object.
Definition irthermo5v.h:123
uint32_t i2c_speed
Definition irthermo5v.h:129
pin_name_t scl
Definition irthermo5v.h:124
pin_name_t pwm
Definition irthermo5v.h:127
pin_name_t sda
Definition irthermo5v.h:125
uint8_t i2c_address
Definition irthermo5v.h:130
IrThermo 5V Click context object.
Definition irthermo5v.h:105
digital_in_t pwm
Definition irthermo5v.h:108
i2c_master_t i2c
Definition irthermo5v.h:111
uint8_t slave_address
Definition irthermo5v.h:114