久久精品国产精品国产一区,少妇扒开毛毛自慰喷水,国产精品无码电影在线观看 ,久久天天躁夜夜躁狠狠85麻豆

思澈科技軟件開發(fā)工具包  2.20
TSEN

TSEN(Temperature SENsor)用于測量芯片當前的溫度。 HCPU 和 LCPU 都可以使用該模塊來獲取芯片組的當前溫度。 當測量數(shù)據(jù)準備好時,它可以產生中斷。

使用TSEN

以下代碼將在不中斷的情況下測量芯片組的溫度。

int temperature;
TSEN_HandleTypeDef TsenHandle;
/*##-1- Initialize TSEN peripheral #######################################*/
HAL_TSEN_Init(&TsenHandle);
temperature = HAL_TSEN_Read(&TsenHandle);
printf("Sync: Current temperature is %d degree\n", temperature);

下面的代碼將測量芯片組的溫度,當測量準備好時產生一個中斷。

void TSEN_IRQHandler(void)
{
LOG_I("IRQ Fired");
HAL_TSEN_IRQHandler(&TsenHandle);
}
int temperature;
TSEN_HandleTypeDef TsenHandle;
/*##-1- Initialize TSEN peripheral #######################################*/
HAL_TSEN_Init(&TsenHandle);
{
int count = 0;
while (HAL_TSEN_GetState(&TsenHandle) != HAL_TSEN_STATE_READY);
}
printf("Async: Current temperature is %d degree\n", TsenHandle.temperature);
TSEN_HandleTypeDef::temperature
int8_t temperature
Definition: bf0_hal_tsen.h:96
HAL_TSEN_Init
HAL_StatusTypeDef HAL_TSEN_Init(TSEN_HandleTypeDef *htsen)
Initializes the Temperature sensor.
HAL_TSEN_GetState
HAL_TSEN_StateTypeDef HAL_TSEN_GetState(TSEN_HandleTypeDef *htsen)
Get current state of temperature sensor module.
HAL_TSEN_IRQHandler
void HAL_TSEN_IRQHandler(TSEN_HandleTypeDef *htsen)
Interrupt handler for temeprature sensor.
TSEN_HandleTypeDef
Definition: bf0_hal_tsen.h:92
HAL_TSEN_STATE_READY
@ HAL_TSEN_STATE_READY
Definition: bf0_hal_tsen.h:78
HAL_TSEN_Read_IT
HAL_TSEN_StateTypeDef HAL_TSEN_Read_IT(TSEN_HandleTypeDef *htsen)
Async Read the current temperature.
HAL_TSEN_Read
int HAL_TSEN_Read(TSEN_HandleTypeDef *htsen)
Synchronized Read the current temperature.
HAL_TSEN_STATE_BUSY
@ HAL_TSEN_STATE_BUSY
Definition: bf0_hal_tsen.h:80