Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
temp_sensor.c File Reference

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

u8 temp_readTempReg (temp_sensor_instance_t *temp, const u8 reg)
 Read a register from the Temperature Sensor.
u8 temp_writeTempReg (temp_sensor_instance_t *temp, const u8 reg, const u8 data)
 Write a value to a register in the Temperature Sensor.
float calculate_temp_celsius (u8 hb, u8 lb, u8 is_extended)
 Calculate temperature in Celsius from high and low byte format.
u8 encode_temp_limit (float val, u8 is_extended, u8 *out_hb, u8 *out_lb)
 Encode temperature limit into high and low byte format.