altos/stm: Make ao_eeprom_total a #define instead of a const variable
authorKeith Packard <keithp@keithp.com>
Mon, 4 May 2020 01:31:19 +0000 (18:31 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 22 May 2020 05:04:46 +0000 (22:04 -0700)
This is unused outside of ao_eeprom_stm.c, and as global const takes
up space in flash.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_eeprom.h
src/stm/ao_eeprom_stm.c

index f258c48c0fa4fc20b48885c5cb5b77c30657a52e..5f6adb0e542599465b4de08c6a17d1f0cf5eb96f 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef _AO_EEPROM_H_
 #define _AO_EEPROM_H_
 
-extern const ao_pos_t  ao_eeprom_total;
-
 /*
  * Write to eeprom
  */
index d3e3338d9c94d7e1e961b29d7606b64193659a79..db4d6a49f0b5801b08ea1cb8f555cbe7c1960d3e 100644 (file)
@@ -20,7 +20,7 @@
 #include <ao_eeprom.h>
 
 /* 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)