VSF Documented
Macros | Functions
rng_common.c File Reference
#include "hal/driver/driver.h"

Macros

#define VSF_RNG_CFG_FUNCTION_RENAME   DISABLED
 

Functions

vsf_err_t vsf_rng_init (vsf_rng_t *rng_ptr)
 initialize a rng instance.
 
void vsf_rng_fini (vsf_rng_t *rng_ptr)
 finalize a rng instance.
 
vsf_err_t vsf_rng_generate_request (vsf_rng_t *rng_ptr, uint32_t *buffer, uint32_t num, void *param, vsf_rng_on_ready_callback_t *on_ready_cb)
 rng generate request
 
vsf_rng_capability_t vsf_rng_capability (vsf_rng_t *rng_ptr)
 get the capability of rng instance.
 

Macro Definition Documentation

◆ VSF_RNG_CFG_FUNCTION_RENAME

#define VSF_RNG_CFG_FUNCTION_RENAME   DISABLED

Function Documentation

◆ vsf_rng_init()

vsf_err_t vsf_rng_init ( vsf_rng_t rng_ptr)

initialize a rng instance.

Parameters
[in]rng_ptra pointer to structure vsf_rng_t
[in]cfg_ptra pointer to structure vsf_rng_cfg_t
Returns
vsf_err_t: VSF_ERR_NONE if rng was initialized, or a negative error code
Note
It is not necessary to call vsf_rng_fini() to deinitialization. vsf_rng_init() should be called before any other rng API except vsf_rng_capability().

◆ vsf_rng_fini()

void vsf_rng_fini ( vsf_rng_t rng_ptr)

finalize a rng instance.

Parameters
[in]rng_ptra pointer to structure vsf_rng_t
Returns
none

◆ vsf_rng_generate_request()

vsf_err_t vsf_rng_generate_request ( vsf_rng_t rng_ptr,
uint32_t buffer,
uint32_t  num,
void *  param,
vsf_rng_on_ready_callback_t on_ready_cb 
)

rng generate request

Parameters
[in]rng_ptra pointer to structure vsf_rng_t
[in]bufferrng data buffer
[in]numthe length of rng data buffer
[in]paramcall back param
[in]on_ready_cbcall back
Returns
vsf_err_t: VSF_ERR_NONE if rng generate request was successfully, or a negative error code

◆ vsf_rng_capability()

vsf_rng_capability_t vsf_rng_capability ( vsf_rng_t rng_ptr)

get the capability of rng instance.

Parameters
[in]rng_ptra pointer to structure vsf_rng_t
Returns
vsf_rng_capability_t: return all capability of current rng vsf_rng_capability_t