added random number generator driver and stuff
This commit is contained in:
@@ -24,8 +24,35 @@
|
||||
|
||||
#include "gpio.h"
|
||||
#include "stm32f4_gpio.h"
|
||||
|
||||
#include "rng.h"
|
||||
#include "stm32f4_rng.h"
|
||||
|
||||
#include "driver.h"
|
||||
|
||||
// Random number generator
|
||||
static RNG_HandleTypeDef stm32f4_rng_handle = {
|
||||
.Instance = RNG,
|
||||
};
|
||||
|
||||
static struct stm32f4_rng stm32f4_rng = {
|
||||
.rng_handle = &stm32f4_rng_handle,
|
||||
};
|
||||
|
||||
static struct rng __rng = {
|
||||
.arch_dep_device = &stm32f4_rng,
|
||||
.fp = &rng_fp,
|
||||
};
|
||||
|
||||
#ifdef TEST_APP
|
||||
static const struct driver rng = {
|
||||
#else
|
||||
const struct driver rng = {
|
||||
#endif
|
||||
.driver_type = DRIVER_TYPE_RNG,
|
||||
.device_driver = &__rng,
|
||||
};
|
||||
|
||||
// GPIO_C0
|
||||
static const GPIO_InitTypeDef port_cfg_c0 = {
|
||||
.Pin = GPIO_PIN_0,
|
||||
|
Reference in New Issue
Block a user