From: Keith Packard Date: Mon, 4 May 2020 01:31:19 +0000 (-0700) Subject: altos/stm: Make ao_eeprom_total a #define instead of a const variable X-Git-Tag: 1.9.3~1^2~41 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=3d70ca6bae383878d8a7c13b862031531fa4ff81;p=fw%2Faltos altos/stm: Make ao_eeprom_total a #define instead of a const variable This is unused outside of ao_eeprom_stm.c, and as global const takes up space in flash. Signed-off-by: Keith Packard --- diff --git a/src/kernel/ao_eeprom.h b/src/kernel/ao_eeprom.h index f258c48c..5f6adb0e 100644 --- a/src/kernel/ao_eeprom.h +++ b/src/kernel/ao_eeprom.h @@ -19,8 +19,6 @@ #ifndef _AO_EEPROM_H_ #define _AO_EEPROM_H_ -extern const ao_pos_t ao_eeprom_total; - /* * Write to eeprom */ diff --git a/src/stm/ao_eeprom_stm.c b/src/stm/ao_eeprom_stm.c index d3e3338d..db4d6a49 100644 --- a/src/stm/ao_eeprom_stm.c +++ b/src/stm/ao_eeprom_stm.c @@ -20,7 +20,7 @@ #include /* Total bytes of available storage */ -const ao_pos_t ao_eeprom_total = 4096; +#define ao_eeprom_total 4096 /* Location of eeprom in address space */ #define stm_eeprom ((uint8_t *) 0x08080000)