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

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
crypto-aes
Lionel Debroux 4 years ago
parent 011b53fb97
commit 943216deda
  1. 4
      main.c
  2. 2
      supervisor/shared/usb/usb.c

@ -185,8 +185,8 @@ bool run_code_py(safe_mode_t safe_mode) {
} else {
new_status_color(MAIN_RUNNING);
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 *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt");
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");
stack_resize();

@ -43,7 +43,7 @@ void load_serial_number(void) {
uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH];
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'};
for (int i = 0; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH; i++) {
for (int j = 0; j < 2; j++) {

Loading…
Cancel
Save