mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Embed: (wiki syntax)

« Back to documentation index

TRNG hal functions

TRNG hal functions
[Hal]

Functions

void trng_init (trng_t *obj)
 Initialize the TRNG peripheral.
void trng_free (trng_t *obj)
 Deinitialize the TRNG peripheral.
int trng_get_bytes (trng_t *obj, uint8_t *output, size_t length, size_t *output_length)
 Get random data from TRNG peripheral.

Function Documentation

void trng_free ( trng_t obj )

Deinitialize the TRNG peripheral.

Parameters:
objThe TRNG object
int trng_get_bytes ( trng_t obj,
uint8_t *  output,
size_t  length,
size_t *  output_length 
)

Get random data from TRNG peripheral.

Parameters:
objThe TRNG object
outputThe pointer to an output array
lengthThe size of output data, to avoid buffer overwrite
output_lengthThe length of generated data
Returns:
0 success, -1 fail
void trng_init ( trng_t obj )

Initialize the TRNG peripheral.

Parameters:
objThe TRNG object