123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- #ifndef NRFX_RNG_H__
- #define NRFX_RNG_H__
- #include <nrfx.h>
- #include <hal/nrf_rng.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct
- {
- bool error_correction : 1;
- uint8_t interrupt_priority;
- } nrfx_rng_config_t;
- #define NRFX_RNG_DEFAULT_CONFIG \
- { \
- .error_correction = NRFX_RNG_CONFIG_ERROR_CORRECTION, \
- .interrupt_priority = NRFX_RNG_CONFIG_IRQ_PRIORITY, \
- }
- typedef void (* nrfx_rng_evt_handler_t)(uint8_t rng_data);
- nrfx_err_t nrfx_rng_init(nrfx_rng_config_t const * p_config, nrfx_rng_evt_handler_t handler);
- void nrfx_rng_start(void);
- void nrfx_rng_stop(void);
- void nrfx_rng_uninit(void);
- void nrfx_rng_irq_handler(void);
- #ifdef __cplusplus
- }
- #endif
- #endif
|