bf0_hal_tsen.h

Header file of temerature sensor.

Author

Sifli software development team

Attention

Defines

HAL_TSEN_Data(htsen)

Temeprature readying convert to Centidegree.

参数:
HAL_ERROR_TEMPRATURE
HAL_TSEN_MAX_DELAY

Enums

enum HAL_TSEN_StateTypeDef

Values:

enumerator HAL_TSEN_STATE_RESET

TSEN not yet initialized or disabled

enumerator HAL_TSEN_STATE_READY

TSEN initialized and ready for use

enumerator HAL_TSEN_STATE_ENABLED

TSEN Power on and enabled

enumerator HAL_TSEN_STATE_BUSY

TSEN internal process is ongoing

enumerator HAL_TSEN_STATE_ERROR

TSEN error state

Functions

HAL_StatusTypeDef HAL_TSEN_Init(TSEN_HandleTypeDef *htsen)

Initializes the Temperature sensor.

参数:
返回值:

HAL – status

HAL_StatusTypeDef HAL_TSEN_DeInit(TSEN_HandleTypeDef *htsen)

DeInitializes the Temperature sensor.

参数:
返回值:

HAL – status

int HAL_TSEN_Read(TSEN_HandleTypeDef *htsen)

Synchronized Read the current temperature.

参数:
返回值:

Current – temeprature of chipset in Centidegree. -1000 if error.

void HAL_TSEN_IRQHandler(TSEN_HandleTypeDef *htsen)

Interrupt handler for temeprature sensor.

参数:
HAL_TSEN_StateTypeDef HAL_TSEN_Read_IT(TSEN_HandleTypeDef *htsen)

Async Read the current temperature.

参数:
返回值:

Current – state of temperature sensor module, temperature data will be read in interrupt

HAL_TSEN_StateTypeDef HAL_TSEN_GetState(TSEN_HandleTypeDef *htsen)

Get current state of temperature sensor module.

参数:
返回值:

Current – state of temperature sensor module

struct TSEN_HandleTypeDef

Public Members

TSEN_TypeDef *Instance

Register base address

HAL_LockTypeDef Lock

TSEN locking object

HAL_TSEN_StateTypeDef State

TSEN communication state

int8_t temperature

last read temperature