Functions | |
| void | SIOStart (int bitrate) |
| Initialize SIO communication at the specified bitrate (baud rate). | |
| void | SIOStartEx (int bitrate, int datalength, int parity, int stopbit) |
| Same as SIOStart() but with more control. | |
| void | SIOStop () |
| Shuts down SIO communication. | |
| unsigned char | SIOReadByte () |
| Read a single byte from the input buffer. | |
| void | SIOSendByte (unsigned char data) |
| Send a single byte to the output buffer. | |
| int | SIOCheckInBuffer () |
| Check if any data is waiting in the input buffer. | |
| int | SIOCheckOutBuffer () |
| Check if port is ready to send data (previous operation finished). | |
| int SIOCheckInBuffer | ( | void | ) |
Check if any data is waiting in the input buffer.
Must be used when fetching data otherwise incorrect data could be read (usually 0x00).
| int SIOCheckOutBuffer | ( | void | ) |
Check if port is ready to send data (previous operation finished).
Must be used when sending data as the output buffer is only 2 bytes long.
| unsigned char SIOReadByte | ( | void | ) |
Read a single byte from the input buffer.
| void SIOSendByte | ( | unsigned char | data | ) |
Send a single byte to the output buffer.
| data | Byte to send |
| void SIOStart | ( | int | bitrate | ) |
Initialize SIO communication at the specified bitrate (baud rate).
Mode is 8N1. (Data Length = 8 bit, No parity, Stop bit Length = 1 bit)
| bitrate | Bitrate (baud rate) |
| void SIOStartEx | ( | int | bitrate, |
| int | datalength, | ||
| int | parity, | ||
| int | stopbit | ||
| ) |
Same as SIOStart() but with more control.
IMPORTANT: Must use defined macros. For example setting datalength to 5 should be done with "SIO_DATA_LEN_5" and not by simply passing 5 as an argument.
| bitrate | Bit rate (baud rate) |
| datalength | Character (data) length |
| parity | Parity |
| stopbit | Stop bit length |
| void SIOStop | ( | void | ) |
Shuts down SIO communication.
1.8.2