From 3d70ca6bae383878d8a7c13b862031531fa4ff81 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 3 May 2020 18:31:19 -0700 Subject: [PATCH] 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 --- src/kernel/ao_eeprom.h | 2 -- src/stm/ao_eeprom_stm.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) 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) -- 2.30.2