39#define LOCAL_TEMP_MSB 0x00
40#define REMOTE1_TEMP_MSB 0x01
41#define REMOTE2_TEMP_MSB 0x02
42#define REMOTE3_TEMP_MSB 0x03
43#define STATUS_REGISTER 0x08
44#define CONFIG1_REGISTER 0x09
45#define CONFIG2_REGISTER 0x0A
46#define CONVERSION_RATE_REGISTER 0x0B
47#define ONE_SHOT_START_REGISTER 0x0F
48#define LOCAL_TEMP_LSB 0x10
49#define REMOTE1_TEMP_LSB 0x11
50#define REMOTE2_TEMP_LSB 0x12
51#define REMOTE3_TEMP_LSB 0x13
52#define nCORRECTION1_REGISTER 0x21
53#define nCORRECTION2_REGISTER 0x22
54#define nCORRECTION3_REGISTER 0x23
55#define SOFTWARE_RESET_REGISTER 0xFC
56#define MAN_ID_REGISTER 0xFE
57#define DEVICE_ID_REGISTER 0xFF
TMP42x_Status __TMP42x_readByte(TMP42x *self, uint8_t MemAddress)
Read a byte of data from TMP42x and stores in the tmp42x::_reg8::raw_data.
uint8_t TMP42x_getManID(TMP42x *self)
Get the manufacturer ID.
uint8_t TMP42x_getDevID(TMP42x *self)
Get the device ID.
double TMP42x_getLocalTemp(TMP42x *self)
Reads the full (floating-point) local temperature from a specified channel.
TMP42x_Status __TMP42x_readTwoBytes(TMP42x *self, uint8_t MemAddress)
Read two bytes of data from TMP42x and stores in the tmp42x::_reg16::raw_data.
TMP42x_Status TMP42x_oneShotStart(TMP42x *self)
Starts a single conversion if the device is in shutdown mode.
int8_t TMP42x_getRemoteTemp_Int(TMP42x *self, uint8_t channel_number)
Reads the integer part of the remote temperature from a specified channel.
struct tmp42x TMP42x
Class (struct) that stores variables for interacting with TMP42x.
TMP42x_Status TMP42x_softwareReset(TMP42x *self)
Resets the device.
TMP42x_Status TMP42x_init(TMP42x *self, TMP42x_Type type, I2C_HandleTypeDef *hi2c, uint8_t I2C_ADDR, TMP42x_Shutdown shutdown, TMP42x_Range range, TMP42x_ConversionRate conversion_rate, float n_eff1, float n_eff2, float n_eff3)
Initialize the TMP42x with the given config.
double TMP42x_getRemoteTemp(TMP42x *self, uint8_t channel_number)
Reads the full (floating-point) remote temperature from a specified channel.
int8_t TMP42x_getLocalTemp_Int(TMP42x *self)
Reads the integer part of the local temperature.
TMP42x_Status __TMP42x_writeByte(TMP42x *self, uint8_t MemAddress)
Write a byte of data to TMP42x from the tmp42x::_reg8::raw_data.
Class (struct) that stores variables for interacting with TMP42x.
TMP42x_ConversionRate conversion_rate
union tmp42x::_reg16 reg16
struct tmp42x::_reg16::_temp_register temp_register
struct tmp42x::_reg8::_n_correction_register n_correction_register
struct tmp42x::_reg8::_man_id_register man_id_register
struct tmp42x::_reg8::_status_register status_register
struct tmp42x::_reg8::_dev_id_register dev_id_register
struct tmp42x::_reg8::_conversion_rate_register conversion_rate_register
struct tmp42x::_reg8::_temp_frac_register temp_frac_register
struct tmp42x::_reg8::_config2_register _config2_register
struct tmp42x::_reg8::_temp_int_register temp_int_register
struct tmp42x::_reg8::_config1_register config1_register