Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Added comment regarding serial fix, fixed indents
Browse files Browse the repository at this point in the history
  • Loading branch information
einsteinx2 authored and skmp committed Apr 2, 2020
1 parent 4593567 commit 183ce7a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions libswirl/hw/sh4/modules/scif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ int SerialReadData(u8* buffer, size_t nbytes) {
}

void SerialWriteData(u8 data) {
if (settings.debug.SerialConsole) {
putc(data, stdout);
}
if (settings.debug.SerialConsole) {
putc(data, stdout);
}
#if FEAT_HAS_SERIAL_TTY
if (pty_master != -1) {
while(write(pty_master, &data, 1) != 1 && errno != EAGAIN)
printf("SERIAL: PTY write failed, %s\n", strerror(errno));
}
if (pty_master != -1) {
while(write(pty_master, &data, 1) != 1 && errno != EAGAIN) {
// Some error other than "resource temporarily unavailable" aka "buffer is full" aka "nothing is consuming it" occurred during write
printf("SERIAL: PTY write failed, %s\n", strerror(errno));
}
}
#endif
}

Expand Down

0 comments on commit 183ce7a

Please sign in to comment.