MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
RNG_Adapter

Overview

Enumerations

enum  hal_rng_status_t {
  kStatus_HAL_RngSuccess = kStatus_Success,
  KStatus_HAL_RngNotSupport = MAKE_STATUS(kStatusGroup_HAL_RNG, 1),
  kStatus_HAL_RngInternalError = MAKE_STATUS(kStatusGroup_HAL_RNG, 2),
  kStatus_HAL_RngNullPointer = MAKE_STATUS(kStatusGroup_HAL_RNG, 3),
  kStatus_HAL_RngMaxRequests = MAKE_STATUS(kStatusGroup_HAL_RNG, 4),
  kStatus_HAL_RngInvalidArgumen = MAKE_STATUS(kStatusGroup_HAL_RNG, 5)
}
 Hal rand status. More...
 

Functions

hal_rng_status_t HAL_RngInit (void)
 Initializes the random adapter module for a random data generator basic operation. More...
 
void HAL_RngDeinit (void)
 DeInitilizate the random adapter module. More...
 
hal_rng_status_t HAL_RngHwGetData (void *pRandomNo, uint32_t dataSize)
 Get random value from random hardware. More...
 
hal_rng_status_t HAL_RngGetData (void *pRandomNo, uint32_t dataSize)
 Get a pseudo random number. More...
 
hal_rng_status_t HAL_RngSetSeed (uint32_t seed)
 Set random seed of random generator hardware. More...
 

Enumeration Type Documentation

Enumerator
kStatus_HAL_RngSuccess 

Success.

KStatus_HAL_RngNotSupport 

Not support.

kStatus_HAL_RngInternalError 

Internal Error.

kStatus_HAL_RngNullPointer 

Null pointer.

kStatus_HAL_RngMaxRequests 

Max request.

kStatus_HAL_RngInvalidArgumen 

Invalid Argumen.

Function Documentation

hal_rng_status_t HAL_RngInit ( void  )
Note
This API should be called at the beginning of the application using the random adapter driver.
Return values
kStatus_HAL_RngSuccessRand module initialize succeed
void HAL_RngDeinit ( void  )
Note
This API should be called when not using the rand adapter driver anymore.
hal_rng_status_t HAL_RngHwGetData ( void *  pRandomNo,
uint32_t  dataSize 
)
Note
This API should be called to get random data.
Parameters
pRandomNoPointer to random data
dataSizeThe random data size
Return values
kStatus_HAL_RngSuccessRand get data succeed
hal_rng_status_t HAL_RngGetData ( void *  pRandomNo,
uint32_t  dataSize 
)
Note
This API should be called to get random data.
Parameters
pRandomNoPointer to random data
dataSizeThe random data size
Return values
kStatus_HAL_RngSuccessRand get data succeed
hal_rng_status_t HAL_RngSetSeed ( uint32_t  seed)
Note
This API should be called to set seed before get random data.
Parameters
seedSeed of the random hardware generator
Return values
kStatus_HAL_RngSuccessRand set rand seed succeed
KStatus_HAL_RngNotSupportRand set rand seed not support