Home |
RTTarget-32 Programming Manual Function RTReceiveChar System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTReceiveCharRTReceiveChar retrieves a byte from the receive buffer: RTCOMData ReceiveChar(int Port); ParametersPortMust have value RT_COM1 .. RT_COM4. return valueContains the actual received data in the low byte and any error information in the high byte (see Rttcom.h for all possible values). If the high byte is 0, no errors have occurred. If the receive buffer is empty, this function waits until data comes in. For complete error checking, use code such as this to receive: C = RTReceiveChar(PORT); if ((C & 0xFF00) == 0) // No errors? printf("received: %c\n", C); // display received char else // handle receive errors printf(RTCOMError(C)); // display receive error message
|