no-OS
no_os_trng.h
Go to the documentation of this file.
1 /***************************************************************************/
41 #ifndef _NO_OS_TRNG_H_
42 #define _NO_OS_TRNG_H_
43 
44 /******************************************************************************/
45 /***************************** Include Files **********************************/
46 /******************************************************************************/
47 
48 #include <stdint.h>
49 
50 /******************************************************************************/
51 /*************************** Types Declarations *******************************/
52 /******************************************************************************/
53 
58 struct no_os_trng_desc;
59 
66  uint32_t dev_id;
68  void *extra;
69 };
70 
71 /******************************************************************************/
72 /************************ Functions Declarations ******************************/
73 /******************************************************************************/
74 
75 /* Initialize descriptor */
76 int32_t no_os_trng_init(struct no_os_trng_desc **desc,
77  struct no_os_trng_init_param *param);
78 
79 /* Free resources allocated in descriptor */
80 void no_os_trng_remove(struct no_os_trng_desc *desc);
81 
82 /* Fill buffer with random numbers */
83 int32_t no_os_trng_fill_buffer(struct no_os_trng_desc *desc, uint8_t *buff,
84  uint32_t len);
85 
86 #endif // _NO_OS_TRNG_H_
no_os_trng_init_param::extra
void * extra
Definition: no_os_trng.h:68
no_os_trng_desc
TRNG Descriptor.
Definition: aducm3029_trng.c:67
no_os_trng_init_param::dev_id
uint32_t dev_id
Definition: no_os_trng.h:66
no_os_trng_fill_buffer
int32_t no_os_trng_fill_buffer(struct no_os_trng_desc *desc, uint8_t *buff, uint32_t len)
Fill buffer with random numbers.
Definition: aducm3029_trng.c:153
no_os_trng_init_param
Init parameter for TRNG.
Definition: no_os_trng.h:64
no_os_trng_init
int32_t no_os_trng_init(struct no_os_trng_desc **desc, struct no_os_trng_init_param *param)
Initialize descriptor.
Definition: aducm3029_trng.c:117
no_os_trng_remove
void no_os_trng_remove(struct no_os_trng_desc *desc)
Free resources allocated in descriptor.
Definition: aducm3029_trng.c:138