|
|
|
@ -1,21 +1,33 @@
|
|
|
|
#include "serialstream.h"
|
|
|
|
#include "serialstream.h"
|
|
|
|
|
|
|
|
|
|
|
|
SerialStream::SerialStream(ComPort port, BaudRate baud_rate, DataBits data_bits,
|
|
|
|
SerialStream::SerialStream(ComPort port, BaudRate baud_rate, DataBits data_bits,
|
|
|
|
StopBits stop_bits, Parity parity) {
|
|
|
|
StopBits stop_bits, Parity parity)
|
|
|
|
(void)port;
|
|
|
|
:Serial(port, baud_rate, data_bits, stop_bits, parity) {}
|
|
|
|
(void)baud_rate;
|
|
|
|
|
|
|
|
(void)data_bits;
|
|
|
|
|
|
|
|
(void)stop_bits;
|
|
|
|
|
|
|
|
(void)parity;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SerialStream::flush() {}
|
|
|
|
void SerialStream::flush() {}
|
|
|
|
|
|
|
|
|
|
|
|
void SerialStream::setForeground(Color c) { (void)c; }
|
|
|
|
void SerialStream::setForeground(Color c) {
|
|
|
|
|
|
|
|
write(0x1b);
|
|
|
|
|
|
|
|
write('[');
|
|
|
|
|
|
|
|
write('3');
|
|
|
|
|
|
|
|
write(c + 0x30);
|
|
|
|
|
|
|
|
write('m');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SerialStream::setBackground(Color c) { (void)c; }
|
|
|
|
void SerialStream::setBackground(Color c) {
|
|
|
|
|
|
|
|
write(0x1b);
|
|
|
|
|
|
|
|
write('[');
|
|
|
|
|
|
|
|
write('4');
|
|
|
|
|
|
|
|
write(c + 0x30);
|
|
|
|
|
|
|
|
write('m');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SerialStream::setAttribute(Attrib a) { (void)a; }
|
|
|
|
void SerialStream::setAttribute(Attrib a) {
|
|
|
|
|
|
|
|
write(0x1b);
|
|
|
|
|
|
|
|
write('[');
|
|
|
|
|
|
|
|
write(a + 0x30);
|
|
|
|
|
|
|
|
write('m');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SerialStream::reset() {}
|
|
|
|
void SerialStream::reset() {}
|
|
|
|
|
|
|
|
|
|
|
|
@ -25,6 +37,6 @@ void SerialStream::setPos(int x, int y) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SerialStream::print(char* str, int length) {
|
|
|
|
void SerialStream::print(char* str, int length) {
|
|
|
|
(void)str;
|
|
|
|
for(int i=0; i < length; i++)
|
|
|
|
(void)length;
|
|
|
|
write(str[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|