mirror of
https://github.com/jscrane/r65emu.git
synced 2024-10-28 07:25:06 +00:00
serial display (#30)
This commit is contained in:
parent
23bfa71c3e
commit
6a36272f5e
@ -71,7 +71,7 @@ void hardware_init(CPU &cpu) {
|
||||
_cpu = &cpu;
|
||||
memory.begin();
|
||||
|
||||
#if defined(DEBUGGING) || defined(CPU_DEBUG)
|
||||
#if defined(DEBUGGING) || defined(CPU_DEBUG) || defined(USE_SERIAL)
|
||||
Serial.begin(TERMINAL_SPEED);
|
||||
#endif
|
||||
|
||||
|
14
hw_serial_dsp.h
Normal file
14
hw_serial_dsp.h
Normal file
@ -0,0 +1,14 @@
|
||||
#if !defined(__HW_SERIAL_DSP_H__)
|
||||
#define __HW_SERIAL_DSP_H__
|
||||
|
||||
class hw_serial_dsp: public serial_dsp {
|
||||
public:
|
||||
hw_serial_dsp(Print &p): _print(p) {}
|
||||
|
||||
void write(uint8_t b) { _print.write(b); }
|
||||
|
||||
private:
|
||||
Print &_print;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#include <Arduino.h>
|
||||
#include "hardware.h"
|
||||
|
||||
#if defined(HW_SERIAL_KBD)
|
||||
#include "serial_kbd.h"
|
||||
#include "hw_serial_kbd.h"
|
||||
|
||||
@ -25,4 +24,3 @@ bool hw_serial_kbd::available() {
|
||||
void hw_serial_kbd::reset() {
|
||||
_serial.begin(TERMINAL_SPEED);
|
||||
}
|
||||
#endif
|
||||
|
2
r65emu.h
2
r65emu.h
@ -19,5 +19,7 @@
|
||||
#include "serial_kbd.h"
|
||||
#include "ps2_serial_kbd.h"
|
||||
#include "hw_serial_kbd.h"
|
||||
#include "serial_dsp.h"
|
||||
#include "hw_serial_dsp.h"
|
||||
|
||||
#endif
|
||||
|
10
serial_dsp.h
Normal file
10
serial_dsp.h
Normal file
@ -0,0 +1,10 @@
|
||||
#if !defined(__SERIAL_DSP_H__)
|
||||
#define __SERIAL_DSP_H__
|
||||
|
||||
class serial_dsp {
|
||||
public:
|
||||
virtual void write(uint8_t) =0;
|
||||
virtual void reset() {}
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user