mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 16:50:50 +01:00
[ion/device] Enable RNG register
Change-Id: If252378cec2709d22acf0b3b3046bbd88a306551
This commit is contained in:
@@ -60,6 +60,11 @@ public:
|
||||
REGS_BOOL_FIELD(DMA2EN, 22);
|
||||
};
|
||||
|
||||
class AHB2ENR : Register32 {
|
||||
public:
|
||||
REGS_BOOL_FIELD(RNGEN, 6);
|
||||
};
|
||||
|
||||
class AHB3ENR : Register32 {
|
||||
public:
|
||||
REGS_BOOL_FIELD(FSMCEN, 0);
|
||||
@@ -92,6 +97,7 @@ public:
|
||||
REGS_REGISTER_AT(PLLCFGR, 0x04);
|
||||
REGS_REGISTER_AT(CFGR, 0x08);
|
||||
REGS_REGISTER_AT(AHB1ENR, 0x30);
|
||||
REGS_REGISTER_AT(AHB2ENR, 0x34);
|
||||
REGS_REGISTER_AT(AHB3ENR, 0x38);
|
||||
REGS_REGISTER_AT(APB1ENR, 0x40);
|
||||
REGS_REGISTER_AT(APB2ENR, 0x44);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "itm.h"
|
||||
#include "pwr.h"
|
||||
#include "rcc.h"
|
||||
#include "rng.h"
|
||||
#include "sdio.h"
|
||||
#include "syscfg.h"
|
||||
#include "tim.h"
|
||||
|
||||
33
ion/src/device/regs/rng.h
Normal file
33
ion/src/device/regs/rng.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef REGS_RNG_H
|
||||
#define REGS_RNG_H
|
||||
|
||||
#include "register.h"
|
||||
|
||||
class RNG {
|
||||
public:
|
||||
class CR : Register32 {
|
||||
public:
|
||||
REGS_BOOL_FIELD(RNGEN, 2);
|
||||
};
|
||||
|
||||
class SR : Register32 {
|
||||
public:
|
||||
REGS_BOOL_FIELD(DRDY, 0);
|
||||
};
|
||||
|
||||
class DR : public Register32 {
|
||||
};
|
||||
|
||||
constexpr RNG() {};
|
||||
REGS_REGISTER_AT(CR, 0x00);
|
||||
REGS_REGISTER_AT(SR, 0x04);
|
||||
REGS_REGISTER_AT(DR, 0x08);
|
||||
private:
|
||||
constexpr uint32_t Base() const {
|
||||
return 0x50060800;
|
||||
}
|
||||
};
|
||||
|
||||
constexpr RNG RNG;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user