Skip to content

Commit 680182c

Browse files
make simpler
1 parent 54ac397 commit 680182c

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

ulisp-esp32.ino

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ char *MakeFilename (object *arg, char *buffer) {
604604

605605
// Save-image and load-image
606606

607-
#if defined(sdcardsupport)
608607
void SDWriteInt (File file, int data) {
609608
file.write(data & 0xFF); file.write(data>>8 & 0xFF);
610609
file.write(data>>16 & 0xFF); file.write(data>>24 & 0xFF);
@@ -615,30 +614,6 @@ int SDReadInt (File file) {
615614
uintptr_t b2 = file.read(); uintptr_t b3 = file.read();
616615
return b0 | b1<<8 | b2<<16 | b3<<24;
617616
}
618-
#elif defined(LITTLEFS)
619-
void FSWrite32 (File file, uint32_t data) {
620-
union { uint32_t data2; uint8_t u8[4]; };
621-
data2 = data;
622-
if (file.write(u8, 4) != 4) error2(SAVEIMAGE, PSTR("not enough room"));
623-
}
624-
625-
uint32_t FSRead32 (File file) {
626-
union { uint32_t data; uint8_t u8[4]; };
627-
file.read(u8, 4);
628-
return data;
629-
}
630-
#else
631-
void EpromWriteInt(int *addr, uintptr_t data) {
632-
EEPROM.write((*addr)++, data & 0xFF); EEPROM.write((*addr)++, data>>8 & 0xFF);
633-
EEPROM.write((*addr)++, data>>16 & 0xFF); EEPROM.write((*addr)++, data>>24 & 0xFF);
634-
}
635-
636-
int EpromReadInt (int *addr) {
637-
uint8_t b0 = EEPROM.read((*addr)++); uint8_t b1 = EEPROM.read((*addr)++);
638-
uint8_t b2 = EEPROM.read((*addr)++); uint8_t b3 = EEPROM.read((*addr)++);
639-
return b0 | b1<<8 | b2<<16 | b3<<24;
640-
}
641-
#endif
642617

643618
unsigned int saveimage (object *arg) {
644619
unsigned int imagesize = compactimage(&arg);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy