diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/common/ARMCMx/mpu_v7m.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/os/hal/ports/common/ARMCMx/mpu_v7m.h b/os/hal/ports/common/ARMCMx/mpu_v7m.h index 48954c95c..11e691aab 100644 --- a/os/hal/ports/common/ARMCMx/mpu_v7m.h +++ b/os/hal/ports/common/ARMCMx/mpu_v7m.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. */
/*===========================================================================*/
|