Commit f2e6c936 authored by Huang Rui's avatar Huang Rui
Browse files

Sync flash_api.c with flash_api.h

parent 7737d36f
...@@ -132,13 +132,13 @@ uint32_t flash_rom_get_size_byte(void) ...@@ -132,13 +132,13 @@ uint32_t flash_rom_get_size_byte(void)
// 32Mbit, 4MByte // 32Mbit, 4MByte
flash_size = 4 * 1024 * 1024; flash_size = 4 * 1024 * 1024;
break; break;
case SIZE_64MBIT: case SIZE_16MBIT_8M_8M:
// 64Mbit, 8MByte // 16Mbit, 2MByte
flash_size = 8 * 1024 * 1024; flash_size = 2 * 1024 * 1024;
break; break;
case SIZE_128MBIT: case SIZE_32MBIT_8M_8M:
// 128Mbit, 16MByte // 32Mbit, 4MByte
flash_size = 16 * 1024 * 1024; flash_size = 4 * 1024 * 1024;
break; break;
default: default:
// Unknown flash size, fall back mode. // Unknown flash size, fall back mode.
...@@ -206,16 +206,18 @@ bool flash_rom_set_size_byte(uint32_t size) ...@@ -206,16 +206,18 @@ bool flash_rom_set_size_byte(uint32_t size)
flash_size = SIZE_32MBIT; flash_size = SIZE_32MBIT;
flash_rom_set_size_type(flash_size); flash_rom_set_size_type(flash_size);
break; break;
/*
case 8 * 1024 * 1024: case 8 * 1024 * 1024:
// 64Mbit, 8MByte // 64Mbit, 8MByte
flash_size = SIZE_64MBIT; flash_size = SIZE_16MBIT_8M_8M;
flash_rom_set_size_type(flash_size); flash_rom_set_size_type(flash_size);
break; break;
case 16 * 1024 * 1024: case 16 * 1024 * 1024:
// 128Mbit, 16MByte // 128Mbit, 16MByte
flash_size = SIZE_128MBIT; flash_size = SIZE_32MBIT_8M_8M;
flash_rom_set_size_type(flash_size); flash_rom_set_size_type(flash_size);
break; break;
*/
default: default:
// Unknown flash size. // Unknown flash size.
result = false; result = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment