mirror of
https://github.com/jscrane/Apple1.git
synced 2024-11-22 06:31:37 +00:00
32 lines
479 B
C++
32 lines
479 B
C++
#include <Arduino.h>
|
|
#include <serial_dsp.h>
|
|
#include "disp.h"
|
|
#include "terminal_disp.h"
|
|
|
|
void terminal_disp::status(const char *s) {
|
|
_p.println(s);
|
|
}
|
|
|
|
void terminal_disp::write(uint8_t b) {
|
|
char c = (char)b;
|
|
switch(c) {
|
|
case '_':
|
|
_p.write(' ');
|
|
_p.write('\b');
|
|
_p.write('\b');
|
|
_p.write('_');
|
|
_p.write('\b');
|
|
break;
|
|
case '\r':
|
|
_p.write(' ');
|
|
_p.write('\r');
|
|
_p.write('\n');
|
|
break;
|
|
default:
|
|
_p.write(b);
|
|
break;
|
|
}
|
|
_p.write('_');
|
|
_p.write('\b');
|
|
}
|