瀏覽代碼

Merge pull request #48 from FrankBoesing/NVIC

Add some missing NVIC definitions
main
Paul Stoffregen 9 年之前
父節點
當前提交
4e2e1500bb
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      teensy3/kinetis.h

+ 4
- 0
teensy3/kinetis.h 查看文件

@@ -2896,10 +2896,14 @@ typedef struct __attribute__((packed)) {
#endif

// Nested Vectored Interrupt Controller, Table 3-4 & ARMv7 ref, appendix B3.4 (page 750)
#define NVIC_STIR (*(volatile uint32_t *)0xE000EF00)
#define NVIC_ENABLE_IRQ(n) (*((volatile uint32_t *)0xE000E100 + ((n) >> 5)) = (1 << ((n) & 31)))
#define NVIC_DISABLE_IRQ(n) (*((volatile uint32_t *)0xE000E180 + ((n) >> 5)) = (1 << ((n) & 31)))
#define NVIC_SET_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) = (1 << ((n) & 31)))
#define NVIC_CLEAR_PENDING(n) (*((volatile uint32_t *)0xE000E280 + ((n) >> 5)) = (1 << ((n) & 31)))
#define NVIC_IS_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) & (1 << ((n) & 31)))
#define NVIC_IS_ACTIVE(n) (*((volatile uint32_t *)0xE000E300 + ((n) >> 5)) & (1 << ((n) & 31)))
#define NVIC_TRIGGER_IRQ(n) NVIC_STIR=(n)

#define NVIC_ISER0 (*(volatile uint32_t *)0xE000E100)
#define NVIC_ISER1 (*(volatile uint32_t *)0xE000E104)

Loading…
取消
儲存