Go to the source code of this file.
◆ VSF_RNG_CFG_MULTI_CLASS
#define VSF_RNG_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability.
◆ VSF_RNG_CFG_PREFIX
#define VSF_RNG_CFG_PREFIX vsf |
Convert count to mask in specific hardware driver.
Convert mask to count in specific hardware driver.
We can redefine macro VSF_RNG_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code.
◆ VSF_RNG_CFG_FUNCTION_RENAME
#define VSF_RNG_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_RNG_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_rng_init()).
◆ VSF_RNG_CFG_REIMPLEMENT_TYPE_CFG
#define VSF_RNG_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Enable macro VSF_RNG_CFG_REIMPLEMENT_TYPE_CFG in specific hardware drivers to redefine struct vsf_rng_cfg_t. For compatibility, members should not be deleted when redefining. The vsf_rng_isr_handler_t type also needs to be redefined.
◆ VSF_RNG_CFG_REIMPLEMENT_TYPE_CAPABILITY
#define VSF_RNG_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Enable macro VSF_RNG_CFG_REIMPLEMENT_TYPE_CAPABILITY in specific hardware drivers to redefine struct vsf_rng_capability_t. For compatibility, members should not be deleted when redefining.
◆ VSF_RNG_CFG_INHERIT_HAL_CAPABILITY
#define VSF_RNG_CFG_INHERIT_HAL_CAPABILITY ENABLED |
◆ VSF_RNG_APIS
#define VSF_RNG_APIS |
( |
|
__prefix_name | ) |
|
Value:
__VSF_HAL_TEMPLATE_API(__prefix_name,
void, rng, fini,
VSF_MCONNECT(__prefix_name, _rng_t) *rng_ptr) \
__VSF_HAL_TEMPLATE_API(__prefix_name,
vsf_err_t, rng, generate_request,
VSF_MCONNECT(__prefix_name, _rng_t) *rng_ptr, \
vsf_err_t
Definition __type.h:42
struct VSF_MCONNECT(VSF_FLASH_CFG_IMP_PREFIX, _flash_t)
Definition flash.c:53
__le16 capability
Definition ieee80211.h:134
unsigned uint32_t
Definition stdint.h:9
Definition vsf_template_rng.h:156
#define __VSF_HAL_TEMPLATE_API
Definition vsf_template_instance_declaration.h:57
void vsf_rng_on_ready_callback_t(void *param, uint32_t *buffer, uint32_t num)
Definition vsf_template_rng.h:154
RNG API template, used to generate RNG type, specific prefix function declarations, etc.
- Parameters
-
[in] | __prefix_name | The prefix used for generating RNG functions. |
◆ vsf_rng_t
◆ vsf_rng_on_ready_callback_t
typedef void vsf_rng_on_ready_callback_t(void *param, uint32_t *buffer, uint32_t num) |
◆ vsf_rng_capability_t
◆ vsf_rng_op_t
◆ vsf_rng_init()
Initialize a RNG instance.
- Parameters
-
- Returns
- vsf_err_t: VSF_ERR_NONE if initialization successful, otherwise returns error code
- Note
- It is not necessary to call vsf_rng_fini() to deinitialize. vsf_rng_init() should be called before any other RNG API except vsf_rng_capability().
◆ vsf_rng_fini()
Finalize a RNG instance.
- Parameters
-
- Returns
- none
◆ vsf_rng_capability()
◆ vsf_rng_generate_request()
RNG generate request.
- Parameters
-
[in] | rng_ptr | a pointer to structure vsf_rng_t |
[in] | buffer | RNG data buffer |
[in] | num | the length of RNG data buffer |
[in] | param | callback parameter |
[in] | on_ready_cb | callback function |
- Returns
- vsf_err_t: VSF_ERR_NONE if the request was successful, otherwise returns error code