summaryrefslogtreecommitdiffstats
path: root/lib/cm4.h
blob: 27c02da13ad94d5807b3aef2c3f1abe3639635cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef LIB_CM4_H
#define LIB_CM4_H

#define CLRPEND(n) REG_32(0xE000E280 + 4 * (n))
#define ISR_CLRPEND(i) CLRPEND((i) / 32) = BV((i) % 32);

#define SETENA(n) REG_32(0xE000E100 + 4 * (n))
#define ISR_SETENA(i) SETENA((i) / 32) = BV((i) % 32);

#define INTPRI(n) REG_8(0xE000E400 + (n))

#endif /* LIB_CM4_H */