add map ids for flash sizes 32m-c2, 64m, 128m in user_rf_cal_sector_set() (#1529)

This commit is contained in:
Arnim Läuger 2016-10-13 09:51:48 +02:00 committed by Marcel Stör
parent b8e00120b6
commit 101eb201ab
2 changed files with 16 additions and 1 deletions

View File

@ -177,7 +177,7 @@ void user_rf_pre_init(void)
uint32 uint32
user_rf_cal_sector_set(void) 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; uint32 rf_cal_sec = 0;
switch (size_map) { 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_512_512:
case FLASH_SIZE_32M_MAP_1024_1024: case FLASH_SIZE_32M_MAP_1024_1024:
case FLASH_SIZE_32M_MAP_2048_2048:
rf_cal_sec = 1024 - 5; rf_cal_sec = 1024 - 5;
break; break;
case FLASH_SIZE_64M_MAP:
rf_cal_sec = 2048 - 5;
break;
case FLASH_SIZE_128M_MAP:
rf_cal_sec = 4096 - 5;
break;
default: default:
rf_cal_sec = 0; rf_cal_sec = 0;
break; break;

View File

@ -6,5 +6,11 @@
bool wifi_softap_deauth(uint8 mac[6]); bool wifi_softap_deauth(uint8 mac[6]);
uint8 get_fpm_auto_sleep_flag(void); 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_ */ #endif /* SDK_OVERRIDES_INCLUDE_USER_INTERFACE_H_ */