1.1 --- a/pic32_c.h Wed Oct 17 13:37:41 2018 +0200
1.2 +++ b/pic32_c.h Wed Oct 17 13:38:01 2018 +0200
1.3 @@ -4,6 +4,7 @@
1.4 #define __PIC32_C_H__
1.5
1.6 #include <stdint.h>
1.7 +#include "mips.h"
1.8 #include "pic32.h"
1.9
1.10 /* Access. */
1.11 @@ -16,6 +17,11 @@
1.12 #define SET_REG(mem, val) (REG(mem + SET) = val)
1.13 #define INV_REG(mem, val) (REG(mem + INV) = val)
1.14
1.15 +/* Address translation. */
1.16 +
1.17 +#define PHYSICAL(addr) (((uint32_t) addr) - KSEG0_BASE)
1.18 +#define HW_PHYSICAL(addr) (((uint32_t) addr) - KSEG1_BASE)
1.19 +
1.20 #endif /* __PIC32_C_H__ */
1.21
1.22 #endif /* __ASSEMBLER__ */