int HAL_UARTReceiveByte(int port, int *status)
Entry | |
---|---|
port | Port number to read from |
status | Optional location to store line status |
Exit | |
---|---|
- | Returns the read byte. |
Return value undefined if no byte was available. |
This is an internal call for use by the DualSerial module and should not be used by user code. Instead of calling the HAL directly, user code should interact with the Serial* entries that DualSerial creates in DeviceFS.
Returns the next byte from the FIFO (if enabled) or the holding register. If status is non-NULL, the line status associated with the byte is read (see HAL_UARTLineStatus). The return value is only meaningful if a received byte is available (bit 0 of *status will be set).