Kaynağa Gözat

soc: mpu hal fixes

Renz Bagaporo 6 yıl önce
ebeveyn
işleme
ece80dbc8e

+ 1 - 1
components/soc/src/esp32/include/hal/mpu_ll.h

@@ -22,7 +22,7 @@
 extern "C" {
 #endif
 
-static inline uint32_t cpu_ll_id_to_addr(int id)
+static inline uint32_t mpu_ll_id_to_addr(int id)
 {
     // vpn - id
     // 0x00000000 = 0

+ 1 - 1
components/soc/src/esp32s2/include/hal/mpu_ll.h

@@ -22,7 +22,7 @@
 extern "C" {
 #endif
 
-static inline uint32_t cpu_ll_id_to_addr(int id)
+static inline uint32_t mpu_ll_id_to_addr(int id)
 {
     // vpn - id
     // 0x00000000 = 0

+ 4 - 1
components/soc/src/hal/mpu_hal.c

@@ -25,7 +25,7 @@
 
 void mpu_hal_set_region_access(int id, mpu_access_t access)
 {
-    uint32_t addr = cpu_ll_id_to_addr(id);
+    uint32_t addr = mpu_ll_id_to_addr(id);
 
     switch (access)
     {
@@ -48,6 +48,9 @@ void mpu_hal_set_region_access(int id, mpu_access_t access)
         case MPU_REGION_RWX:
             mpu_ll_set_region_rwx(addr);
             break;
+        case MPU_REGION_ILLEGAL:
+            mpu_ll_set_region_illegal(addr);
+            break;
         default:
             break;
     }