Numworks Epsilon
1.4.1
Graphing Calculator Operating System
flash.h
Go to the documentation of this file.
1
#ifndef REGS_FLASH_H
2
#define REGS_FLASH_H
3
4
#include "
register.h
"
5
6
class
FLASH
{
7
public
:
8
class
ACR
:
public
Register32
{
9
public
:
10
REGS_FIELD
(LATENCY,
uint8_t
, 3, 0);
11
REGS_BOOL_FIELD
(PRFTEN, 8);
12
REGS_BOOL_FIELD
(ICEN, 9);
13
REGS_BOOL_FIELD
(DCEN, 10);
14
REGS_BOOL_FIELD
(ICRST, 11);
15
REGS_BOOL_FIELD
(DCRST, 12);
16
};
17
18
class
KEYR
:
public
Register32
{
19
};
20
21
class
CR
:
public
Register32
{
22
public
:
23
enum class
PSIZE
:
uint8_t
{
24
X8
= 0,
25
X16
= 1,
26
X32
= 2,
27
X64
= 3
28
};
29
REGS_BOOL_FIELD
(PG, 0);
30
REGS_BOOL_FIELD
(SER, 1);
31
REGS_BOOL_FIELD
(MER, 2);
32
REGS_FIELD
(SNB,
uint8_t
, 6, 3);
33
REGS_TYPE_FIELD
(
PSIZE
, 9, 8);
34
REGS_BOOL_FIELD
(STRT, 16);
35
REGS_BOOL_FIELD
(LOCK, 31);
36
};
37
38
class
SR
:
public
Register32
{
39
public
:
40
REGS_BOOL_FIELD
(BSY, 16);
41
};
42
43
constexpr
FLASH
() {};
44
REGS_REGISTER_AT
(ACR, 0x00);
45
REGS_REGISTER_AT
(KEYR, 0x04);
46
REGS_REGISTER_AT
(SR, 0x0C);
47
REGS_REGISTER_AT
(CR, 0x10);
48
private
:
49
constexpr
uint32_t
Base()
const
{
50
return
0x40023C00;
51
}
52
};
53
54
constexpr
FLASH
FLASH
;
55
56
#endif
register.h
FLASH::CR::PSIZE
PSIZE
Definition:
flash.h:23
FLASH::SR::REGS_BOOL_FIELD
REGS_BOOL_FIELD(BSY, 16)
FLASH::CR::REGS_TYPE_FIELD
REGS_TYPE_FIELD(PSIZE, 9, 8)
FLASH::CR::PSIZE::X64
uint8_t
unsigned char uint8_t
Definition:
stdint.h:4
FLASH::CR::REGS_BOOL_FIELD
REGS_BOOL_FIELD(PG, 0)
FLASH::CR::PSIZE::X32
FLASH
constexpr FLASH FLASH
Definition:
flash.h:54
FLASH::ACR::REGS_FIELD
REGS_FIELD(LATENCY, uint8_t, 3, 0)
Register
Definition:
register.h:8
FLASH::ACR::REGS_BOOL_FIELD
REGS_BOOL_FIELD(PRFTEN, 8)
FLASH::REGS_REGISTER_AT
REGS_REGISTER_AT(ACR, 0x00)
FLASH::CR::PSIZE::X16
uint32_t
unsigned int uint32_t
Definition:
stdint.h:6
FLASH::CR::REGS_FIELD
REGS_FIELD(SNB, uint8_t, 6, 3)
FLASH::CR
Definition:
flash.h:21
FLASH::CR::PSIZE::X8
FLASH::SR
Definition:
flash.h:38
FLASH::FLASH
constexpr FLASH()
Definition:
flash.h:43
FLASH::KEYR
Definition:
flash.h:18
FLASH
Definition:
flash.h:6
FLASH::ACR
Definition:
flash.h:8
epsilon
ion
src
device
regs
flash.h
Generated by
1.8.14