feedback
This commit is contained in:
@@ -17,7 +17,7 @@ namespace CGA {
|
||||
}
|
||||
|
||||
void setCursor(unsigned abs_x, unsigned abs_y) {
|
||||
uint16_t pos = abs_y * COLUMNS + abs_x;
|
||||
uint16_t pos = abs_y * COLUMNS + abs_x;
|
||||
|
||||
writeCGAReg(RegisterIndex::CURSOR_LOW, pos & 0xFF);
|
||||
writeCGAReg(RegisterIndex::CURSOR_HIGH, ((pos >> 8) & 0xFF));
|
||||
|
||||
@@ -43,9 +43,8 @@ int Serial::write(char out) {
|
||||
if(out == '\n')
|
||||
write('\r');
|
||||
|
||||
if(readReg(LINE_STATUS_REGISTER) & TRANSMITTER_EMPTY){
|
||||
writeReg(TRANSMIT_BUFFER_REGISTER, out);
|
||||
return out;
|
||||
}
|
||||
return -1;
|
||||
while(!(readReg(LINE_STATUS_REGISTER) & TRANSMITTER_EMPTY));
|
||||
|
||||
writeReg(TRANSMIT_BUFFER_REGISTER, out);
|
||||
return out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user