22 #include <adi_processor.h> 23 #include <adi_callback.h> 25 #if !defined(__ADUCM4x50__) && !defined(__ADUCM302x__) 26 #error "Unsupported processor" 29 #include <adi_rng_config.h> 37 #pragma diag_suppress=Pm011 72 #define ADI_RNG_MEMORY_SIZE (12u) 86 uint32_t
const nDeviceNum,
88 uint32_t
const MemorySize,
109 uint16_t
const nLenPrescaler,
110 uint16_t
const nLenReload
128 uint32_t*
const pRegData
134 uint32_t*
const pOscCount
140 uint32_t
const nIndex,
141 uint8_t*
const pOscDiff
154 uint16_t*
const pLenPrescaler,
155 uint16_t*
const pLenReload
163 #pragma diag_default=Pm011
ADI_RNG_RESULT adi_rng_GetStuckStatus(ADI_RNG_HANDLE const hDevice, bool *const pbFlag)
Retrieve whether the RNG oscillator output is stuck at a constant value.
ADI_RNG_RESULT adi_rng_GetOscCount(ADI_RNG_HANDLE const hDevice, uint32_t *const pOscCount)
Retrieve the current RNG Oscillator count.
ADI_RNG_RESULT adi_rng_GetRngData(ADI_RNG_HANDLE const hDevice, uint32_t *const pRegData)
Retrieve the current value of the RNG data register.
ADI_RNG_RESULT adi_rng_GetOscDiff(ADI_RNG_HANDLE const hDevice, uint32_t const nIndex, uint8_t *const pOscDiff)
Retrieve the current RNG Oscillator difference value for the given index.
ADI_RNG_RESULT adi_rng_RegisterCallback(ADI_RNG_HANDLE hDevice, ADI_CALLBACK cbFunc, void *pCBParam)
RNG Application callback registration API.
ADI_RNG_RESULT adi_rng_GetSampleLen(ADI_RNG_HANDLE const hDevice, uint16_t *const pLenPrescaler, uint16_t *const pLenReload)
Retrieve the current RNG sample length prescale and reload value configured in the device.
ADI_RNG_RESULT adi_rng_GetRdyStatus(ADI_RNG_HANDLE const hDevice, bool *const pbFlag)
Retrieves the current state of RNG data/CRC accumulator register.
ADI_RNG_RESULT adi_rng_EnableBuffering(ADI_RNG_HANDLE const hDevice, bool const bFlag)
Enables/Disables Buffering for RNG.
ADI_RNG_RESULT adi_rng_SetSampleLen(ADI_RNG_HANDLE const hDevice, uint16_t const nLenPrescaler, uint16_t const nLenReload)
Sets the reload and prescale value for the sample counter. The Sample Length will be nLenReload*2^nLe...
ADI_RNG_RESULT adi_rng_Open(uint32_t const nDeviceNum, void *const pMemory, uint32_t const MemorySize, ADI_RNG_HANDLE *const phDevice)
Opena a Random Number Generator Device.
ADI_RNG_RESULT adi_rng_Close(ADI_RNG_HANDLE hDevice)
Uninitializes and deallocates the RNG device.
ADI_RNG_RESULT adi_rng_Enable(ADI_RNG_HANDLE const hDevice, bool const bFlag)
Enables/Disables the RNG device.