temp_sensor_status_t
Temperature Sensor Status List.
@ TEMP_SENSOR_USER_ERR
User provide wrong input */.
@ TEMP_SENSOR_SKIP
Skip the function */.
@ TEMP_SENSOR_HIGH_ALERT
High Temperature Alert */.
@ TEMP_SENSOR_OK
Successful Operation */.
@ TEMP_SENSOR_LOW_ALERT
Low Temperature Alert */.
@ TEMP_SENSOR_ERR
Failed to retrieve/write value */.
u8 temp_writeTempReg(temp_sensor_instance_t *temp, const u8 reg, const u8 data)
Write a value to a register in the Temperature Sensor.
u8 temp_readTempReg(temp_sensor_instance_t *temp, const u8 reg)
Read a register from the Temperature Sensor.
u8 encode_temp_limit(float val, u8 is_extended, u8 *out_hb, u8 *out_lb)
Encode temperature limit into high and low byte format.
float calculate_temp_celsius(u8 hb, u8 lb, u8 is_extended)
Calculate temperature in Celsius from high and low byte format.
struct temp_sensor_instance temp_sensor_instance_t
Forward declaration of Temperature Sensor instance.
I2C driver API definitions.
I2C instance. Holds the software registers and hardware pointer.
Temperature Sensor API structure.
temp_sensor_status_t(* checkTempAlert)(temp_sensor_instance_t *temp)
u8(* checkTempRange)(temp_sensor_instance_t *temp)
temp_sensor_status_t(* getTemp)(temp_sensor_instance_t *temp)
temp_sensor_status_t(* setTempRange)(temp_sensor_instance_t *temp, u8 enable_extended)
temp_sensor_status_t(* getTempLimit)(temp_sensor_instance_t *temp)
temp_sensor_status_t(* setTempLimit)(temp_sensor_instance_t *temp)
Hold temperature data for a single channel/diode.
float high_limit
High Temperature Limit */.
float current_temp
Current Temperature */.
float low_limit
Low Temperature Limit */.
Temperature Sensor data structure.
temp_sensor_channelData_t channels[3]
Temperature Sensor instance structure.
const temp_sensor_api_t * drv
Pointer to Temperature Sensor API structure */.
temp_sensor_data_t temp_value
Temperature Sensor data */.
i2c_instance_t * inst
Pointer to I2C instance */.
Temperature Sensor Configuration and Driver Selection.