Numworks Epsilon
1.4.1
Graphing Calculator Operating System
nvic.h
Go to the documentation of this file.
1
#ifndef REGS_NVIC_H
2
#define REGS_NVIC_H
3
4
#include "
register.h
"
5
6
// http://www.st.com/content/ccc/resource/technical/document/programming_manual/6c/3a/cb/e7/e4/ea/44/9b/DM00046982.pdf/files/DM00046982.pdf/jcr:content/translations/en.DM00046982.pdf
7
class
NVIC
{
8
public
:
9
class
MaskRegister
:
Register32
{
10
public
:
11
bool
get
(
int
index) {
return
(
bool
)
getBitRange
(index, index); }
12
void
set
(
int
index,
bool
state)
volatile
{
setBitRange
(index, index, state); }
13
};
14
15
class
NVIC_ISER0
:
public
MaskRegister
{ };
16
class
NVIC_ISER1
:
public
MaskRegister
{ };
17
class
NVIC_ISER2
:
public
MaskRegister
{ };
18
class
NVIC_ICER0
:
public
MaskRegister
{ };
19
class
NVIC_ICER1
:
public
MaskRegister
{ };
20
class
NVIC_ICER2
:
public
MaskRegister
{ };
21
22
constexpr
NVIC
() {};
23
REGS_REGISTER_AT
(NVIC_ISER0, 0x00);
24
REGS_REGISTER_AT
(NVIC_ISER1, 0x04);
25
REGS_REGISTER_AT
(NVIC_ISER2, 0x08);
26
REGS_REGISTER_AT
(NVIC_ICER0, 0x80);
27
REGS_REGISTER_AT
(NVIC_ICER1, 0x84);
28
REGS_REGISTER_AT
(NVIC_ICER2, 0x88);
29
private
:
30
constexpr
uint32_t
Base()
const
{
31
return
0xE000E100;
32
}
33
};
34
35
constexpr
NVIC
NVIC
;
36
37
#endif
NVIC::NVIC_ICER0
Definition:
nvic.h:18
NVIC::NVIC_ISER1
Definition:
nvic.h:16
register.h
NVIC
Definition:
nvic.h:7
NVIC::REGS_REGISTER_AT
REGS_REGISTER_AT(NVIC_ISER0, 0x00)
NVIC::MaskRegister
Definition:
nvic.h:9
NVIC::NVIC_ICER1
Definition:
nvic.h:19
NVIC::NVIC_ISER0
Definition:
nvic.h:15
Register
Definition:
register.h:8
uint32_t
unsigned int uint32_t
Definition:
stdint.h:6
NVIC::NVIC_ICER2
Definition:
nvic.h:20
Register::setBitRange
void setBitRange(uint8_t high, uint8_t low, T value) volatile
Definition:
register.h:21
NVIC::NVIC_ISER2
Definition:
nvic.h:17
NVIC
constexpr NVIC NVIC
Definition:
nvic.h:35
NVIC::NVIC
constexpr NVIC()
Definition:
nvic.h:22
Register::getBitRange
T getBitRange(uint8_t high, uint8_t low) volatile
Definition:
register.h:24
epsilon
ion
src
device
regs
nvic.h
Generated by
1.8.14