(Actually a non 0 value, as there are any number of reasons not to succeed, but usually only one success case.) When getchar() returns -1 it is clearly not returning a character. The value of -1 is often used as false/invalid/fail indicator on Unix/Linux. A valid character while will have a value in the range 0 to 255. When the serial transmission ends, the file driver reports this as an EOF (End Of File) condition.ĮOF is not a character. Serial connections are usually accessed using a file driver. On a serial connection an EOT (End Of Transmission) character indicates a desire to end the transmission. Additional control characters are used for transmission control and error correction. These include characters such as SOH, STX, ETX, FS, RS, GS, and, US. There are a number of other control characters which are related to transmission of data over serial lines or storage of files on a serial source like paper tape. EOT is one of a number of control characters used by seerial devices.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |