TSEN(Temperature SENsor)用于測量芯片當前的溫度。 HCPU 和 LCPU 都可以使用該模塊來獲取芯片組的當前溫度。 當測量數(shù)據(jù)準備好時,它可以產生中斷。
使用TSEN
以下代碼將在不中斷的情況下測量芯片組的溫度。
int temperature;
printf("Sync: Current temperature is %d degree\n", temperature);
下面的代碼將測量芯片組的溫度,當測量準備好時產生一個中斷。
void TSEN_IRQHandler(void)
{
LOG_I("IRQ Fired");
}
int temperature;
{
int count = 0;
}
printf(
"Async: Current temperature is %d degree\n", TsenHandle.
temperature);