re hop...

This commit is contained in:
tTh 2018-12-12 16:10:02 +01:00
parent 0514cc5d10
commit f9b0f41b58
1 changed files with 5 additions and 4 deletions

View File

@ -40,8 +40,8 @@ struct termios options;
#if DEBUG_LEVEL #if DEBUG_LEVEL
fprintf(stderr, "%s ( %s %d )\n", __func__, port, baudrate); fprintf(stderr, "%s ( %s %d )\n", __func__, port, baudrate);
#endif #endif
//OPEN THE UART // OPEN THE UART
//The flags (defined in fcntl.h): // The flags (defined in fcntl.h):
// Access modes (use 1 of these): // Access modes (use 1 of these):
// O_RDONLY - Open for reading only. // O_RDONLY - Open for reading only.
// O_RDWR - Open for reading and writing. // O_RDWR - Open for reading and writing.
@ -96,9 +96,10 @@ tcsetattr(uart0, TCSANOW, &options);
return uart0; return uart0;
} }
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/*
* maybe we have to check for timeout ?
*/
int getbyte(int fd) int getbyte(int fd)
{ {
unsigned char byte; unsigned char byte;