diff options
author | Vincent Pelletier <[email protected]> | 2022-10-30 02:21:01 +0000 |
---|---|---|
committer | Vincent Pelletier <[email protected]> | 2022-10-31 08:52:33 +0000 |
commit | f07f6f90255b581f99c80ca84477dd91a9745f92 (patch) | |
tree | fc4406ec43ddf5fe597f9f69721f0925725a0351 /Cart_Reader/SMS.ino | |
parent | 0a823bf5b784aebbf3ec7ea1a11846174c4348ee (diff) | |
download | cartreader-f07f6f90255b581f99c80ca84477dd91a9745f92.tar.gz cartreader-f07f6f90255b581f99c80ca84477dd91a9745f92.zip |
All: Replace print_Error(*, boolean) calls with print_{,Fatal}Error(*)
Also, make print_FatalError(*) independent from print_Error(*).
Also, factorise common parts of print_Error(*).
Frees 2336 bytes of program space and 5 bytes of global ram space.
Diffstat (limited to 'Cart_Reader/SMS.ino')
-rw-r--r-- | Cart_Reader/SMS.ino | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Cart_Reader/SMS.ino b/Cart_Reader/SMS.ino index 1020ed0..5f499cb 100644 --- a/Cart_Reader/SMS.ino +++ b/Cart_Reader/SMS.ino @@ -593,7 +593,7 @@ void readROM_SMS() { // Open file on sd card
if (!myFile.open(fileName, O_RDWR | O_CREAT)) {
- print_Error(sd_error_STR, true);
+ print_FatalError(sd_error_STR);
}
// set default bank size to 16KB
@@ -678,7 +678,7 @@ void readSRAM_SMS() { // Open file on sd card
if (!myFile.open(fileName, O_RDWR | O_CREAT)) {
- print_Error(sd_error_STR, true);
+ print_FatalError(sd_error_STR);
}
// Write the whole 32KB
// When there is only 8KB of SRAM, the contents should be duplicated
@@ -705,7 +705,7 @@ void writeSRAM_SMS() { display_Clear();
if (false) {
- print_Error(F("DISABLED"), false);
+ print_Error(F("DISABLED"));
} else {
fileBrowser(F("Select file"));
@@ -748,7 +748,7 @@ void writeSRAM_SMS() { print_STR(done_STR, 1);
display_Update();
} else {
- print_Error(sd_error_STR, true);
+ print_FatalError(sd_error_STR);
}
}
|