1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-07-20 12:28:59 +00:00

add USE_SPIRAM config

This commit is contained in:
Stephen Crane 2018-11-16 10:25:23 +00:00
parent a9613bc823
commit bb1c69f48a
8 changed files with 33 additions and 10 deletions

View File

@ -18,7 +18,7 @@
#include "ps2drv.h"
#include "CPU.h"
#if defined(SPIRAM_CS)
#if defined(USE_SPIRAM)
#include <SpiRAM.h>
#include "spiram.h"
spiram sram(SPIRAM_SIZE);
@ -32,7 +32,7 @@ static CPU *_cpu;
bool hardware_reset() {
bool success = true;
#if defined(SPIRAM_CS)
#if defined(USE_SPIRAM)
extern SPIClass SPIRAM_DEV;
SPIRAM_DEV.begin();
SPIRAM_DEV.setModule(SPIRAM_SPI);
@ -73,7 +73,7 @@ void hardware_init(CPU &cpu) {
digitalWrite(SD_CS, HIGH);
#endif
#if defined(SPIRAM_CS)
#if defined(USE_SPIRAM)
pinMode(SPIRAM_CS, OUTPUT);
digitalWrite(SPIRAM_CS, HIGH);
#endif

View File

@ -22,7 +22,7 @@ void hardware_restore(class Stream &);
#ifdef __PS2DRV_H__
extern class PS2Driver ps2;
#endif
#if defined(__SPIRAM_H__) && defined(SPIRAM_CS)
#if defined(__SPIRAM_H__) && defined(USE_SPIRAM)
extern class spiram sram;
#endif
#ifdef __MEMORY_H__

View File

@ -16,7 +16,7 @@
#define KBD_IRQ 35
// SPI-RAM
#undef SPIRAM_CS
#undef USE_SPIRAM
// "tape" storage...
#undef USE_SD

View File

@ -12,7 +12,7 @@
#define KBD_IRQ 35
// SPI-RAM
#undef SPIRAM_CS
#undef USE_SPIRAM
// "tape" storage...
#undef USE_SD

View File

@ -16,7 +16,7 @@
#define KBD_IRQ D4
// SPI-RAM
#undef SPIRAM_CS
#undef USE_SPIRAM
// "tape" storage...
#undef USE_SD

View File

@ -14,6 +14,7 @@
#define KBD_IRQ PE_5
// SPI-RAM
#define USE_SPIRAM
#define SPIRAM_CS PE_0
#define SPIRAM_SPI 1
#define SPIRAM_DEV SPI_for_SD

22
hw/lm4f-utft.h Normal file
View File

@ -0,0 +1,22 @@
// TFT display...
// NOTE: edit memorysaver.h to select the correct chip for your display!
// Daniel Rebollo's boosterpack
#define USE_UTFT
#define TFT_BACKLIGHT PD_6
#define TFT_MODEL SSD1289
#define TFT_RS PC_6
#define TFT_WR PC_5
#define TFT_CS PC_7
#define TFT_RST PC_4
// PS/2 keyboard
#define KBD_DATA PE_4
#define KBD_IRQ PE_5
// SPI-RAM
#undef USE_SPIRAM
// "tape" storage...
#undef USE_SD
#define SPI_CS PF_3

View File

@ -1,10 +1,10 @@
#include "hardware.h"
#if defined(USE_SPIRAM)
#include <SPI.h>
#include <SpiRAM.h>
#include "memory.h"
#include "spiram.h"
#include "hardware.h"
#if defined(SPIRAM_CS)
extern SPIClass SPIRAM_DEV;