Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add map ids for flash sizes 32m-c2, 64m, 128m in user_rf_cal_sector_s… #1529

Merged
merged 1 commit into from
Oct 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion app/user/user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions sdk-overrides/include/user_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */