From ceba105275ca7d43a7c425f25787423ea3c90c4c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 23 Apr 2019 06:53:43 +0000 Subject: Fixed bug #1027. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12753 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/common/ports/ARMCMx/mpu.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'os/common/ports/ARMCMx/mpu.h') 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. */ /*===========================================================================*/ -- cgit v1.2.3