no-OS
trng.h
Go to the documentation of this file.
1 /***************************************************************************/
41 #ifndef TRNG_H
42 #define TRNG_H
43 
44 /******************************************************************************/
45 /***************************** Include Files **********************************/
46 /******************************************************************************/
47 
48 #include <stdint.h>
49 
50 /******************************************************************************/
51 /*************************** Types Declarations *******************************/
52 /******************************************************************************/
53 
58 struct 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 trng_init(struct trng_desc **desc, struct trng_init_param *param);
77 
78 /* Free resources allocated in descriptor */
79 void trng_remove(struct trng_desc *desc);
80 
81 /* Fill buffer with random numbers */
82 int32_t trng_fill_buffer(struct trng_desc *desc, uint8_t *buff, uint32_t len);
83 
84 #endif
trng_desc
TRNG Descriptor.
Definition: trng.c:67
trng_init_param::extra
void * extra
Definition: trng.h:68
trng_remove
void trng_remove(struct trng_desc *desc)
Free resources allocated in descriptor.
Definition: trng.c:137
trng_init
int32_t trng_init(struct trng_desc **desc, struct trng_init_param *param)
Initialize descriptor.
Definition: trng.c:117
trng_init_param::dev_id
uint32_t dev_id
Definition: trng.h:66
trng_init_param
Init parameter for TRNG.
Definition: trng.h:64
trng_fill_buffer
int32_t trng_fill_buffer(struct trng_desc *desc, uint8_t *buff, uint32_t len)
Fill buffer with random numbers.
Definition: trng.c:152