MT7697 API Reference  LinkIt SDK v4
TRNG

This section introduces the True Randam Number Generator(TRNG) APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, TRNG function groups, enums, structures and functions. More...

Overview

This section introduces the True Randam Number Generator(TRNG) APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, TRNG function groups, enums, structures and functions.

Terms and acronyms

Terms Details
TRNG True Randam Number Generator. TRNG is a hardware generator to generate random data for applications.

How to use this driver

Functions

hal_trng_status_t hal_trng_init (void)
 This function initializes the TRNG hardware clock. More...
 
hal_trng_status_t hal_trng_deinit (void)
 This function de-initializes the TRNG hardware clock. More...
 
hal_trng_status_t hal_trng_get_generated_random_number (uint32_t *random_number)
 This function gets the random number generated by the TRNG. More...
 

Modules

 Enum
 

Function Documentation

hal_trng_status_t hal_trng_deinit ( void  )

This function de-initializes the TRNG hardware clock.

Returns
Indicates whether this function call is successful or not. If the return value is HAL_TRNG_STATUS_OK, the operation completed successfully.
Example
Sample code, please refer to How to use this driver.
See also
hal_trng_init()
hal_trng_status_t hal_trng_get_generated_random_number ( uint32_t *  random_number)

This function gets the random number generated by the TRNG.

Parameters
[out]random_numberis the TRNG hardware generated random number.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_TRNG_STATUS_OK, the operation completed successfully.
Example
Sample code, please refer to How to use this driver.
See also
hal_trng_init(),hal_trng_deinit().
hal_trng_status_t hal_trng_init ( void  )

This function initializes the TRNG hardware clock.

Returns
Indicates whether this function call is successful or not. If the return value is HAL_TRNG_STATUS_OK, the operation completed successfully.
Example
Sample code, please refer to How to use this driver.
See also
hal_trng_deinit()