1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/pic32_c.h Tue Oct 16 23:26:17 2018 +0200
1.3 @@ -0,0 +1,21 @@
1.4 +#ifndef __ASSEMBLER__
1.5 +
1.6 +#ifndef __PIC32_C_H__
1.7 +#define __PIC32_C_H__
1.8 +
1.9 +#include <stdint.h>
1.10 +#include "pic32.h"
1.11 +
1.12 +/* Access. */
1.13 +
1.14 +#define REG(mem) *((volatile uint32_t *) (mem))
1.15 +
1.16 +/* Bit clearing, setting and inverting. */
1.17 +
1.18 +#define CLR_REG(mem, val) (REG(mem + CLR) = val)
1.19 +#define SET_REG(mem, val) (REG(mem + SET) = val)
1.20 +#define INV_REG(mem, val) (REG(mem + INV) = val)
1.21 +
1.22 +#endif /* __PIC32_C_H__ */
1.23 +
1.24 +#endif /* __ASSEMBLER__ */