diff options
author | James Buren <braewoods+rb@braewoods.net> | 2020-11-14 18:35:00 +0000 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2020-11-14 23:21:15 +0000 |
commit | c10eea46a95bec807fffc20a8d55b4575bc5e6ca (patch) | |
tree | f73a84002e0e3f6c60c6f5b25fab9055f587772c /apps/plugins/iriver_flash.c | |
parent | 7d9ac021b5bac5078778c4b2489d31c9f2892404 (diff) | |
download | rockbox-c10eea46a95bec807fffc20a8d55b4575bc5e6ca.tar.gz rockbox-c10eea46a95bec807fffc20a8d55b4575bc5e6ca.zip |
iriver_flash: add macros to reduce the rom chip table
The table is now gated by the FLASH_SIZE macro as any given
target will not have a known rom chip of a differing size
than the FLASH_SIZE. This will reduce the resulting code
a bit as well.
Change-Id: I06a283f9f44118080a106e1bcd410e81e0a48d92
Diffstat (limited to 'apps/plugins/iriver_flash.c')
-rw-r--r-- | apps/plugins/iriver_flash.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c index 748945c4c0..39ec19a016 100644 --- a/apps/plugins/iriver_flash.c +++ b/apps/plugins/iriver_flash.c | |||
@@ -141,8 +141,13 @@ static bool flash_get_info(const struct flash_info** out_info) | |||
141 | { | 141 | { |
142 | static const struct flash_info roms[] = | 142 | static const struct flash_info roms[] = |
143 | { | 143 | { |
144 | #if FLASH_SIZE == 2048 * 1024 | ||
144 | { 0x00BF, 0x2782, 2048 * 1024, "SST39VF160" }, | 145 | { 0x00BF, 0x2782, 2048 * 1024, "SST39VF160" }, |
146 | #elif FLASH_SIZE == 4096 * 1024 | ||
145 | { 0x00BF, 0x235B, 4096 * 1024, "SST39VF3201" }, | 147 | { 0x00BF, 0x235B, 4096 * 1024, "SST39VF3201" }, |
148 | #else | ||
149 | #error "Unsupported rom chip." | ||
150 | #endif | ||
146 | {0} | 151 | {0} |
147 | }; | 152 | }; |
148 | static struct flash_info unknown_rom = {0}; | 153 | static struct flash_info unknown_rom = {0}; |