Numworks Epsilon  1.4.1
Graphing Calculator Operating System
exti.h
Go to the documentation of this file.
1 #ifndef REGS_EXTI_H
2 #define REGS_EXTI_H
3 
4 #include "register.h"
5 
6 class EXTI {
7 public:
9  public:
10  bool get(int index) { return (bool)getBitRange(index, index); }
11  void set(int index, bool state) volatile { setBitRange(index, index, state); }
12  };
13 
14  class IMR : public MaskRegister { };
15  class EMR : public MaskRegister { };
16  class RTSR : public MaskRegister { };
17  class FTSR : public MaskRegister { };
18  class PR : public MaskRegister { };
19 
20  constexpr EXTI() {};
21  REGS_REGISTER_AT(IMR, 0x00);
22  REGS_REGISTER_AT(EMR, 0x04);
23  REGS_REGISTER_AT(RTSR, 0x08);
24  REGS_REGISTER_AT(FTSR, 0x0C);
25  REGS_REGISTER_AT(PR, 0x14);
26 private:
27  constexpr uint32_t Base() const {
28  return 0x40013C00;
29  }
30 };
31 
32 constexpr EXTI EXTI;
33 
34 #endif
constexpr EXTI()
Definition: exti.h:20
Definition: exti.h:14
Definition: exti.h:6
constexpr EXTI EXTI
Definition: exti.h:32
unsigned int uint32_t
Definition: stdint.h:6
REGS_REGISTER_AT(IMR, 0x00)
Definition: exti.h:18
void setBitRange(uint8_t high, uint8_t low, T value) volatile
Definition: register.h:21
Definition: exti.h:15
T getBitRange(uint8_t high, uint8_t low) volatile
Definition: register.h:24