mirror of
https://github.com/jscrane/r65emu.git
synced 2025-03-26 04:32:38 +00:00
esp8266 SD
This commit is contained in:
parent
6f243f07c5
commit
d22a61368e
14
hardware.cpp
14
hardware.cpp
@ -4,13 +4,9 @@
|
||||
|
||||
#if defined(USE_SD)
|
||||
#include <SD.h>
|
||||
#endif
|
||||
|
||||
#if defined(USE_SPIFFS)
|
||||
#elif defined(USE_SPIFFS)
|
||||
#include <SPIFFS.h>
|
||||
#endif
|
||||
|
||||
#if defined(ESP8266)
|
||||
#elif defined(USE_FS)
|
||||
#include <FS.h>
|
||||
#endif
|
||||
|
||||
@ -41,13 +37,17 @@ bool hardware_reset() {
|
||||
#endif
|
||||
|
||||
#if defined(USE_SD)
|
||||
#if defined(SD_SPI)
|
||||
success = SD.begin(SD_CS, 2, SD_SPI);
|
||||
pinMode(SPI_CS, OUTPUT); // without this, the SPI-RAM isn't seen
|
||||
#else
|
||||
success = SD.begin(SD_CS);
|
||||
#endif
|
||||
|
||||
#elif defined(USE_SPIFFS)
|
||||
success = SPIFFS.begin(true);
|
||||
|
||||
#elif defined(ESP8266)
|
||||
#elif defined(USE_FS)
|
||||
success = SPIFFS.begin();
|
||||
#endif
|
||||
|
||||
|
30
hw/esp8266-pwm-sd.h
Normal file
30
hw/esp8266-pwm-sd.h
Normal file
@ -0,0 +1,30 @@
|
||||
// TFT display...
|
||||
#define USE_ESPI
|
||||
//must define these in Makefile (or platformio)
|
||||
//#define USER_SETUP_LOADED
|
||||
//#define ILI9341_DRIVER
|
||||
//#define TFT_CS PIN_D6
|
||||
//#define TFT_DC PIN_D8
|
||||
//#define TFT_WIDTH 240
|
||||
//#define TFT_HEIGHT 320
|
||||
//#define TFT_RST -1
|
||||
//#define SPI_FREQUENCY 40000000
|
||||
//#define LOAD_GLCD
|
||||
|
||||
// PS/2 keyboard
|
||||
#define KBD_DATA D3
|
||||
#define KBD_IRQ D4
|
||||
|
||||
// SPI-RAM
|
||||
#undef USE_SPIRAM
|
||||
|
||||
// "tape" storage...
|
||||
#define USE_SD
|
||||
#define SD_CS D0
|
||||
#undef USE_SPIFFS
|
||||
#undef USE_FS
|
||||
|
||||
// sound
|
||||
#define PWM_SOUND D2
|
||||
#define PWM_DUTY 20 // 20/1024 -> volume
|
||||
#define PWM_TOP 1024
|
Loading…
x
Reference in New Issue
Block a user