mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
stm32/mpu: Rename MPU_CONFIG_DISABLE to MPU_CONFIG_NOACCESS.
The existing MPU_CONFIG_DISABLE macro enables the MPU region but disables all access to it. The rename is necessary to support an MPU_CONFIG_DISABLE macro that actually disables the MPU region entirely. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
committed by
Damien George
parent
5fe99013b6
commit
2345c1a04e
@@ -37,7 +37,12 @@
|
||||
#define MPU_REGION_SDRAM1 (MPU_REGION_NUMBER4)
|
||||
#define MPU_REGION_SDRAM2 (MPU_REGION_NUMBER5)
|
||||
|
||||
#define MPU_CONFIG_DISABLE(srd, size) ( \
|
||||
// Attribute value to disable a region entirely, remove it from the MPU
|
||||
// (i.e. the MPU_REGION_ENABLE bit is unset.)
|
||||
#define MPU_CONFIG_DISABLE 0
|
||||
|
||||
// Configure a region with all access disabled. Can also set a Subregion Disable mask.
|
||||
#define MPU_CONFIG_NOACCESS(srd, size) ( \
|
||||
MPU_INSTRUCTION_ACCESS_DISABLE << MPU_RASR_XN_Pos \
|
||||
| MPU_REGION_NO_ACCESS << MPU_RASR_AP_Pos \
|
||||
| MPU_TEX_LEVEL0 << MPU_RASR_TEX_Pos \
|
||||
|
||||
Reference in New Issue
Block a user