Skip to content

Commit

Permalink
added more robust SD-card support + changed a vga pin
Browse files Browse the repository at this point in the history
  • Loading branch information
jaleck0 committed Jan 6, 2025
1 parent 13f5cfc commit 7def04e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions Core/src/OS/CluaShell.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,21 @@ void InitShell()
// Initialize SD card
if (!sd_init_driver())
{
TerminalPutString("ERROR: Could not initialize SD card\r\n");
TerminalPutString("ERROR: could not initialize sd-card\r\n> ");
//while (true);
}

// Mount drive
fr = f_mount(&fs, "0:", 1);
if (fr != FR_OK)
{
TerminalPutString("ERROR: Could not mount filesystem \r\n");
TerminalPutString("ERROR: could not mount filesystem \r\n> ");
//while (true);
}
else
{
TerminalPutString("sd-card has been found\r\n> ");
}
}

void StartShell()
Expand Down
5 changes: 3 additions & 2 deletions Core/src/OS/Commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,17 +454,18 @@ static int l_loadfilesd(lua_State* L)
//FIL fil;
//int ret;


fr = f_open(&fil, filename, FA_READ);
if (fr != FR_OK) {
TerminalPutString("ERROR: Could not open file \r\n");
TerminalPutString("ERROR: could not open file \r\n");
//while (true);
}


file[0] = '\0';
file[1] = '\0';

TerminalPutString("Loading ");
TerminalPutString("loading ");
TerminalPutString(filename);
TerminalPutString(" into the text editor\r\n");

Expand Down
4 changes: 2 additions & 2 deletions Core/src/scanvideo/scanvideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#endif

#ifndef PICO_SCANVIDEO_DPI_PIXEL_RSHIFT
#define PICO_SCANVIDEO_DPI_PIXEL_RSHIFT 1u
#define PICO_SCANVIDEO_DPI_PIXEL_RSHIFT 0u
#endif

#ifndef PICO_SCANVIDEO_DPI_PIXEL_GSHIFT
#define PICO_SCANVIDEO_DPI_PIXEL_GSHIFT 6u
#define PICO_SCANVIDEO_DPI_PIXEL_GSHIFT 5u
#endif

#ifndef PICO_SCANVIDEO_DPI_PIXEL_BSHIFT
Expand Down
2 changes: 1 addition & 1 deletion Core/src/sd/sd_driver/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extern "C" {
}
#endif

#define USE_LED 1
#define USE_LED 0
#if USE_LED
# define LED_PIN 25
# include "hardware/gpio.h"
Expand Down

0 comments on commit 7def04e

Please sign in to comment.