diff --git a/app/user/user_main.c b/app/user/user_main.c index 41fb9408..55259b2c 100644 --- a/app/user/user_main.c +++ b/app/user/user_main.c @@ -177,7 +177,7 @@ void user_rf_pre_init(void) uint32 user_rf_cal_sector_set(void) { - enum flash_size_map size_map = system_get_flash_size_map(); + enum ext_flash_size_map size_map = system_get_flash_size_map(); uint32 rf_cal_sec = 0; switch (size_map) { @@ -196,9 +196,18 @@ user_rf_cal_sector_set(void) case FLASH_SIZE_32M_MAP_512_512: case FLASH_SIZE_32M_MAP_1024_1024: + case FLASH_SIZE_32M_MAP_2048_2048: rf_cal_sec = 1024 - 5; break; + case FLASH_SIZE_64M_MAP: + rf_cal_sec = 2048 - 5; + break; + + case FLASH_SIZE_128M_MAP: + rf_cal_sec = 4096 - 5; + break; + default: rf_cal_sec = 0; break; diff --git a/sdk-overrides/include/user_interface.h b/sdk-overrides/include/user_interface.h index b288f995..61ce8356 100644 --- a/sdk-overrides/include/user_interface.h +++ b/sdk-overrides/include/user_interface.h @@ -6,5 +6,11 @@ bool wifi_softap_deauth(uint8 mac[6]); uint8 get_fpm_auto_sleep_flag(void); +enum ext_flash_size_map { + FLASH_SIZE_32M_MAP_2048_2048 = 7, + FLASH_SIZE_64M_MAP = 8, + FLASH_SIZE_128M_MAP = 9 +}; + #endif /* SDK_OVERRIDES_INCLUDE_USER_INTERFACE_H_ */