technoblogy / ulisp-tdeck

A version of uLisp to convert the LilyGO T-Deck into a self-contained handheld Lisp computer.
15 stars 2 forks source link

Added SD-card reader functionality. #1

Closed nanomonkey closed 10 months ago

nanomonkey commented 10 months ago

By pulling up the CS pins on all of the other SPI components and using a different tft library, I was able to get the SD card reader and the display to work together.

The sd_begin function and initSD function are nearly identical, so they probably should be combined into one. I was just not sure whether the Serial prints should be kept or removed. I could see both use cases.

technoblogy commented 10 months ago

Hi Scott, I've uploaded your .ino file to my T-Deck. I get the SD card information printed out such as SD_MMC Card Type:, and the screen works fine, but when I try and do anything with the card such as (save-image) or (directory) I get a register dump. Any suggestions?

Thanks, David

technoblogy commented 10 months ago

PS I've got ESP32 Arduino Core 2.0.12, and I'm running on the Arduino IDE 1.8.19 on a Mac.

technoblogy commented 10 months ago

That did the trick - great work!

I've got some other improvements I want to include. I'll merge them all together and release a new version.

nanomonkey commented 10 months ago

Hi @technoblogy

Thanks for the catch. I appear to have added a subtle bug while doing a cleanup of my initial work. The init_sd function had a bool return value instead of void as I intended to combine that function with the initSD and make it similar to sd.begin().

I haven't done a intensive stress test, but what I've tried works withe the sdcard now. Let me know if you have any further problems.

technoblogy commented 10 months ago

By the way, I think I'll leave out the call to initSD() as it doesn't seem necessary.

technoblogy commented 10 months ago

I've incorporated your changes into the latest release - thanks!