38 #ifndef __DRIVERLIB_MPU_H__ 39 #define __DRIVERLIB_MPU_H__ 59 #define MPU_CONFIG_PRIV_DEFAULT 4 60 #define MPU_CONFIG_HARDFLT_NMI 2 61 #define MPU_CONFIG_NONE 0 68 #define MPU_RGN_SIZE_32B (4 << 1) 69 #define MPU_RGN_SIZE_64B (5 << 1) 70 #define MPU_RGN_SIZE_128B (6 << 1) 71 #define MPU_RGN_SIZE_256B (7 << 1) 72 #define MPU_RGN_SIZE_512B (8 << 1) 74 #define MPU_RGN_SIZE_1K (9 << 1) 75 #define MPU_RGN_SIZE_2K (10 << 1) 76 #define MPU_RGN_SIZE_4K (11 << 1) 77 #define MPU_RGN_SIZE_8K (12 << 1) 78 #define MPU_RGN_SIZE_16K (13 << 1) 79 #define MPU_RGN_SIZE_32K (14 << 1) 80 #define MPU_RGN_SIZE_64K (15 << 1) 81 #define MPU_RGN_SIZE_128K (16 << 1) 82 #define MPU_RGN_SIZE_256K (17 << 1) 83 #define MPU_RGN_SIZE_512K (18 << 1) 85 #define MPU_RGN_SIZE_1M (19 << 1) 86 #define MPU_RGN_SIZE_2M (20 << 1) 87 #define MPU_RGN_SIZE_4M (21 << 1) 88 #define MPU_RGN_SIZE_8M (22 << 1) 89 #define MPU_RGN_SIZE_16M (23 << 1) 90 #define MPU_RGN_SIZE_32M (24 << 1) 91 #define MPU_RGN_SIZE_64M (25 << 1) 92 #define MPU_RGN_SIZE_128M (26 << 1) 93 #define MPU_RGN_SIZE_256M (27 << 1) 94 #define MPU_RGN_SIZE_512M (28 << 1) 96 #define MPU_RGN_SIZE_1G (29 << 1) 97 #define MPU_RGN_SIZE_2G (30 << 1) 98 #define MPU_RGN_SIZE_4G (31 << 1) 105 #define MPU_RGN_PERM_EXEC 0x00000000 106 #define MPU_RGN_PERM_NOEXEC 0x10000000 107 #define MPU_RGN_PERM_PRV_NO_USR_NO 0x00000000 108 #define MPU_RGN_PERM_PRV_RW_USR_NO 0x01000000 109 #define MPU_RGN_PERM_PRV_RW_USR_RO 0x02000000 110 #define MPU_RGN_PERM_PRV_RW_USR_RW 0x03000000 111 #define MPU_RGN_PERM_PRV_RO_USR_NO 0x05000000 112 #define MPU_RGN_PERM_PRV_RO_USR_RO 0x06000000 119 #define MPU_SUB_RGN_DISABLE_0 0x00000100 120 #define MPU_SUB_RGN_DISABLE_1 0x00000200 121 #define MPU_SUB_RGN_DISABLE_2 0x00000400 122 #define MPU_SUB_RGN_DISABLE_3 0x00000800 123 #define MPU_SUB_RGN_DISABLE_4 0x00001000 124 #define MPU_SUB_RGN_DISABLE_5 0x00002000 125 #define MPU_SUB_RGN_DISABLE_6 0x00004000 126 #define MPU_SUB_RGN_DISABLE_7 0x00008000 133 #define MPU_RGN_ENABLE 1 134 #define MPU_RGN_DISABLE 0 141 extern void MPUEnable(uint32_t ui32MPUConfig);
146 extern void MPURegionSet(uint32_t ui32Region, uint32_t ui32Addr,
148 extern void MPURegionGet(uint32_t ui32Region, uint32_t *pui32Addr,
149 uint32_t *pui32Flags);
162 #endif // __DRIVERLIB_MPU_H__ void MPURegionGet(uint32_t ui32Region, uint32_t *pui32Addr, uint32_t *pui32Flags)
Definition: mpu.c:363
void MPURegionDisable(uint32_t ui32Region)
Definition: mpu.c:192
void MPUDisable(void)
Definition: mpu.c:114
void MPUIntUnregister(void)
Definition: mpu.c:438
uint32_t MPURegionCountGet(void)
Definition: mpu.c:134
void MPURegionSet(uint32_t ui32Region, uint32_t ui32Addr, uint32_t ui32Flags)
Definition: mpu.c:319
void MPUEnable(uint32_t ui32MPUConfig)
Definition: mpu.c:87
void MPUIntRegister(void(*pfnHandler)(void))
Definition: mpu.c:406
void MPURegionEnable(uint32_t ui32Region)
Definition: mpu.c:159