RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches
temp_sensor.c File Reference
#include "sensor/temp_sensor/temp_sensor.h"
#include <stddef.h>

Go to the source code of this file.

Overview

Temperature Sensor driver implementation.

Implements the functions defined in temp_sensor.h for controlling Temperature Sensor input/output and interrupts on the EfxSapphireSoC platform.

Definition in file temp_sensor.c.

Functions

temp_sensor_status_t tempSensor_applyConfig (temp_sensor_instance_t *temp)
 Apply I2C + Temp Sensor configuration.
temp_sensor_status_t tempSensor_enableErrorInterrupt (temp_sensor_instance_t *temp)
 Enable error interrupt for the Temperature Sensor.
u8 tempSensor_readTempReg (temp_sensor_instance_t *temp, const u8 reg)
 Read a register from the Temperature Sensor.
u8 tempSensor_writeTempReg (temp_sensor_instance_t *temp, const u8 reg, const u8 data)
 Write a value to a register in the Temperature Sensor.
float tempSensor_calTempCelsius (u8 hb, u8 lb, u8 is_extended)
 Calculate temperature in Celsius from high and low byte format.
u8 tempSensor_encodeTempLimit (float val, u8 is_extended, u8 *out_hb, u8 *out_lb)
 Encode temperature limit into high and low byte format.