Make several const char / const char * arrays static to save a bit of space.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
This commit is contained in:
Lionel Debroux 2019-02-07 19:43:40 +01:00
parent 011b53fb97
commit 943216deda
2 changed files with 3 additions and 3 deletions

4
main.c
View File

@ -185,8 +185,8 @@ bool run_code_py(safe_mode_t safe_mode) {
} else { } else {
new_status_color(MAIN_RUNNING); new_status_color(MAIN_RUNNING);
const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt"); static const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt");
const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py", static const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py",
"main.txt.py", "main.py.txt", "main.txt.txt","main.py.py"); "main.txt.py", "main.py.txt", "main.txt.txt","main.py.py");
stack_resize(); stack_resize();

View File

@ -43,7 +43,7 @@ void load_serial_number(void) {
uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH]; uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH];
common_hal_mcu_processor_get_uid(raw_id); common_hal_mcu_processor_get_uid(raw_id);
const char nibble_to_hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', static const char nibble_to_hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'}; 'A', 'B', 'C', 'D', 'E', 'F'};
for (int i = 0; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH; i++) { for (int i = 0; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH; i++) {
for (int j = 0; j < 2; j++) { for (int j = 0; j < 2; j++) {