Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

HAL RNG Generic Driver

UM1725

47.2.16HAL_RNG_ErrorCallback

Function Name

void HAL_RNG_ErrorCallback (RNG_HandleTypeDef * hrng)

Function Description

RNG error callbacks.

Parameters

 

hrng: pointer to a RNG_HandleTypeDef structure that

 

 

contains the configuration information for RNG.

Return values

 

None

47.2.17HAL_RNG_GetState

Function Name

HAL_RNG_StateTypeDef HAL_RNG_GetState

 

(RNG_HandleTypeDef * hrng)

Function Description

Returns the RNG state.

Parameters

 

hrng: pointer to a RNG_HandleTypeDef structure that

 

 

contains the configuration information for RNG.

Return values

 

HAL state

47.3RNG Firmware driver defines

47.3.1RNG

RNG Interrupt definition

RNG_IT_DRDY RNG_IT_CEI RNG_IT_SEI

RNG Flag definition

Data Ready interrupt Clock error interrupt Seed error interrupt

RNG_FLAG_DRDY

Data ready

RNG_FLAG_CECS

Clock error current status

RNG_FLAG_SECS

Seed error current status

RNG Exported Macros

__HAL_RNG_RESET_HANDLE_STATE Description:

Reset RNG handle state.

Parameters:

__HANDLE__: RNG Handle

Return value:

 

 

None

__HAL_RNG_ENABLE

Description:

 

Enables the RNG peripheral.

 

Parameters:

 

 

__HANDLE__: RNG Handle

 

Return value:

610/900

DOCID025834 Rev 2

UM1725

 

HAL RNG Generic Driver

 

 

None

 

__HAL_RNG_DISABLE

Description:

 

 

Disables the RNG peripheral.

 

 

Parameters:

 

 

 

__HANDLE__: RNG Handle

 

 

Return value:

 

 

 

None

 

__HAL_RNG_GET_FLAG

Description:

 

 

Check the selected RNG flag status.

 

Parameters:

 

 

 

__HANDLE__: RNG Handle

 

 

__FLAG__: RNG flag This parameter can

 

 

be one of the following values:

 

 

 

RNG_FLAG_DRDY: Data ready

 

 

RNG_FLAG_CECS: Clock error

 

 

current status

 

 

 

RNG_FLAG_SECS: Seed error

 

 

current status

 

 

Return value:

 

 

The: new state of __FLAG__ (SET or

 

 

RESET).

 

__HAL_RNG_CLEAR_FLAG

Description:

 

 

Clears the selected RNG flag status.

 

Parameters:

 

 

 

__HANDLE__: RNG handle

 

 

__FLAG__: RNG flag to clear

 

 

Return value:

 

 

 

None

 

 

Notes:

 

 

WARNING: This is a dummy macro for

 

 

HAL code alignment, flags

 

 

 

RNG_FLAG_DRDY, RNG_FLAG_CECS

 

 

and RNG_FLAG_SECS are read-only.

__HAL_RNG_ENABLE_IT

Description:

 

 

Enables the RNG interrupts.

 

 

Parameters:

 

 

 

__HANDLE__: RNG Handle

 

 

Return value:

 

 

 

None

 

__HAL_RNG_DISABLE_IT

Description:

 

DOCID025834 Rev 2

611/900

HAL RNG Generic Driver

 

UM1725

 

Disables the RNG interrupts.

 

Parameters:

 

 

__HANDLE__: RNG Handle

 

Return value:

 

 

None

__HAL_RNG_GET_IT

Description:

 

Checks whether the specified RNG

 

 

interrupt has occurred or not.

 

Parameters:

 

 

__HANDLE__: RNG Handle

 

__INTERRUPT__: specifies the RNG

 

 

interrupt status flag to check. This

 

 

parameter can be one of the following

 

 

values:

 

 

RNG_IT_DRDY: Data ready interrupt

 

 

RNG_IT_CEI: Clock error interrupt

 

 

RNG_IT_SEI: Seed error interrupt

 

Return value:

 

The: new state of __INTERRUPT__ (SET

 

 

or RESET).

__HAL_RNG_CLEAR_IT

Description:

 

Clear the RNG interrupt status flags.

 

Parameters:

 

 

__HANDLE__: RNG Handle

 

__INTERRUPT__: specifies the RNG

 

 

interrupt status flag to clear. This

 

 

parameter can be one of the following

 

 

values:

 

 

RNG_IT_CEI: Clock error interrupt

 

 

RNG_IT_SEI: Seed error interrupt

 

Return value:

 

 

None

 

Notes:

RNG_IT_DRDY flag is read-only, reading RNG_DR register automatically clears RNG_IT_DRDY.

RNG Private Constants

RNG_TIMEOUT_VALUE

RNG Private Macros

IS_RNG_IT

IS_RNG_FLAG

612/900

DOCID025834 Rev 2

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]