kopia lustrzana https://github.com/espressif/esp-idf
hal: mpu: fix signed overflow error
rodzic
4e73cff729
commit
da90775d98
|
@ -22,7 +22,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
||||
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||
{
|
||||
// vpn - id
|
||||
// 0x00000000 = 0
|
||||
|
@ -33,7 +33,7 @@ static inline uint32_t mpu_ll_id_to_addr(int id)
|
|||
// 0xa0000000 = 5
|
||||
// 0xc0000000 = 6
|
||||
// 0xe0000000 = 7
|
||||
return (unsigned)id * SOC_MPU_MIN_REGION_SIZE;
|
||||
return id * SOC_MPU_MIN_REGION_SIZE;
|
||||
}
|
||||
|
||||
static inline void mpu_ll_set_region_rw(uint32_t addr)
|
||||
|
|
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
|
||||
/* This LL is currently unused for ESP32-C3 - cleanup is TODO ESP32-C3 IDF-2375 */
|
||||
|
||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
||||
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
||||
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||
{
|
||||
// vpn - id
|
||||
// 0x00000000 = 0
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
||||
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||
{
|
||||
// vpn - id
|
||||
// 0x00000000 = 0
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
/*-------------------------- MPU CAPS ----------------------------------------*/
|
||||
//TODO: correct the caller and remove unsupported lines
|
||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#pragma once
|
||||
|
||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
/*-------------------------- MPU CAPS ----------------------------------------*/
|
||||
//TODO: correct the caller and remove unsupported lines
|
||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#pragma once
|
||||
|
||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||
|
|
Ładowanie…
Reference in New Issue