2018-10-16 | Paul Boddie | raw annotate files changeset graph | Some tidied-up configuration and initialisation routines and a simple UART test. |
1 #ifndef __ASSEMBLER__ 2 3 #ifndef __PIC32_C_H__ 4 #define __PIC32_C_H__ 5 6 #include <stdint.h> 7 #include "pic32.h" 8 9 /* Access. */ 10 11 #define REG(mem) *((volatile uint32_t *) (mem)) 12 13 /* Bit clearing, setting and inverting. */ 14 15 #define CLR_REG(mem, val) (REG(mem + CLR) = val) 16 #define SET_REG(mem, val) (REG(mem + SET) = val) 17 #define INV_REG(mem, val) (REG(mem + INV) = val) 18 19 #endif /* __PIC32_C_H__ */ 20 21 #endif /* __ASSEMBLER__ */