diff options
Diffstat (limited to 'os/common/ports/ARMCMx/mpu.h')
-rw-r--r-- | os/common/ports/ARMCMx/mpu.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/os/common/ports/ARMCMx/mpu.h b/os/common/ports/ARMCMx/mpu.h index b6c631993..850be915b 100644 --- a/os/common/ports/ARMCMx/mpu.h +++ b/os/common/ports/ARMCMx/mpu.h @@ -196,6 +196,20 @@ MPU->RASR = ((uint32_t)attribs); \
}
+/**
+ * @brief Changes an MPU region base address.
+ *
+ * @param[in] region the region number
+ * @param[in] address start address of the region, note, there are alignment
+ * constraints
+ *
+ * @api
+ */
+#define mpuSetRegionAddress(region, addr) { \
+ MPU->RNR = ((uint32_t)region); \
+ MPU->RBAR = ((uint32_t)addr); \
+}
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
|