3131#endif
3232
3333#define FCW_CTRLA (*(volatile uint32_t *)(FCW_BASE + 0x00U))
34- #define FCW_CTRLB (*(volatile uint32_t *)(FCW_BASE + 0x04U))
3534#define FCW_MUTEX (*(volatile uint32_t *)(FCW_BASE + 0x08U))
36- #define FCW_INTENCLR (*(volatile uint32_t *)(FCW_BASE + 0x0CU))
37- #define FCW_INTENSET (*(volatile uint32_t *)(FCW_BASE + 0x10U))
3835#define FCW_INTFLAG (*(volatile uint32_t *)(FCW_BASE + 0x14U))
3936#define FCW_STATUS (*(volatile uint32_t *)(FCW_BASE + 0x18U))
4037#define FCW_KEY (*(volatile uint32_t *)(FCW_BASE + 0x1CU))
4138#define FCW_ADDR (*(volatile uint32_t *)(FCW_BASE + 0x20U))
42- #define FCW_SRCADDR (*(volatile uint32_t *)(FCW_BASE + 0x24U))
4339#define FCW_DATA ((volatile uint32_t *)(FCW_BASE + 0x28U))
4440#define FCW_SWAP (*(volatile uint32_t *)(FCW_BASE + 0x48U))
45- #define FCW_PWP ((volatile uint32_t *)(FCW_BASE + 0x4CU))
46- #define FCW_LBWP (*(volatile uint32_t *)(FCW_BASE + 0x6CU))
47- #define FCW_UBWP (*(volatile uint32_t *)(FCW_BASE + 0x70U))
48- #define FCW_UOWP (*(volatile uint32_t *)(FCW_BASE + 0x74U))
49- #define FCW_CWP (*(volatile uint32_t *)(FCW_BASE + 0x78U))
50- #define FCW_HSMINTENCLR (*(volatile uint32_t *)(FCW_BASE + 0x80U))
51- #define FCW_HSMINTENSET (*(volatile uint32_t *)(FCW_BASE + 0x84U))
52- #define FCW_HSMINTFLAG (*(volatile uint32_t *)(FCW_BASE + 0x88U))
53- #define FCW_HSMCWP (*(volatile uint32_t *)(FCW_BASE + 0x8CU))
54- #define FCW_HSMLDAT ((volatile uint32_t *)(FCW_BASE + 0x90U))
55- #define FCW_HSMUDAT ((volatile uint32_t *)(FCW_BASE + 0xB0U))
5641
5742#define FCW_UNLOCK_WRKEY 0x91C32C01
5843#define FCW_UNLOCK_SWAPKEY 0x91C32C02
59- #define FCW_UNLOCK_CFGKEY 0x91C32C04
6044#define FCW_OP_ERASE_SECTOR 0x4
6145#define FCW_OP_QUAD_DOUBLE_WORD_WRITE 0x2
62- #define FCW_OP_NOOP 0x0
6346
6447#define FCW_BUSY_MASK (1 << 0)
6548#define FCW_CTRLA_PREPG_BIT (1 << 7)
@@ -106,15 +89,6 @@ static uint32_t pic32_last_err = 0;
10689#define OSCCTRL_STATUS_PLL0LOCK (1 << 24)
10790#define OSCCTRL_INTFLAG_PLL0LOCKR (1 << 24)
10891
109- #define OSCCTRL_FRACDIV0 (*(volatile uint32_t *)(OSCCTRL_BASE + 0x6CU))
110- #define OSCCTRL_FRACDIV0_REMDIV_SHIFT (7)
111- #define OSCCTRL_FRACDIV0_REMDIV (X ) ((X) << OSCCTRL_FRACDIV0_REMDIV_SHIFT)
112- #define OSCCTRL_FRACDIV0_INTDIV_SHIFT (16)
113- #define OSCCTRL_FRACDIV0_INTDIV (X ) ((X) << OSCCTRL_FRACDIV0_INTDIV_SHIFT)
114-
115- #define OSCCTRL_SYNCBUSY (*(volatile uint32_t *)(OSCCTRL_BASE + 0x78U))
116- #define OSCCTRL_SYNCBUSY_FRACDIV0_MASK (1 << 6)
117-
11892#define GCLK_CTRLA (*(volatile uint32_t *)(GCLK_BASE + 0x00U))
11993#define GCLK_SYNCBUSY (*(volatile uint32_t *)(GCLK_BASE + 0x4U))
12094#define GCLK_GENCTRL ((volatile uint32_t *)(GCLK_BASE + 0x20U))
@@ -127,7 +101,6 @@ static uint32_t pic32_last_err = 0;
127101#define GCLK_CTRLA_SWRST (1)
128102
129103#define MCLK_INTFLAG (*(volatile uint32_t *)(MCLK_BASE + 0x08U))
130- #define MCLK_DIV0 (*(volatile uint32_t *)(MCLK_BASE + 0x0CU))
131104#define MCLK_DIV1 (*(volatile uint32_t *)(MCLK_BASE + 0x10U))
132105#define MCLK_INTFLAG_CKRDY (1)
133106
0 commit comments