Serial_crx(), Serial_rxlen(), Serial_rxbyte () – Maxim Integrated 73S12xxF Software User Manual
Page 42: E 42)
73S12xxF Software User Guide
UG_12xxF_016
42
Rev. 1.50
len: Input parameter.
Specifies the maximum number of bytes to receive at any one time.
Return Codes On a successful completion or termination, the serial Status will return one of the following:
S_EMPTY
Reception has started but the receive buffer is still empty.
S_PENDING
Reception has started, but is not yet completed.
S_FULL
Reception has started and the buffer is now full.
S_PARITY_ERR Parity error occurred on the received byte(s).
S_OVERRUN
Buffer overrun, which may result in a loss of at least 1 byte.
Serial_CRx()
Purpose
Get additional bytes from the receiving buffer.
Synopsis
Unsigned Integer Serial_CRx ( U08x xdata *buffer, U16 len )
Parameters
buffer: Input parameter
Specifies a pointer to the data buffer to store the data received from the PC UART.
len: Input parameter.
Specifies the maximum number of bytes to receive at any one time.
Return Value Upon completion, returns the number of bytes received thus far.
Serial_RxLen()
Purpose
Number of bytes received thus far.
Synopsis
Unsigned Integer Serial_ RxLen ( void )
Parameters
None.
Return Value
Unsigned integer specifying the number of bytes received thus far.
Serial_RxByte ()
Purpose
Get a quick byte out of the input buffer.
Synopsis
Unsigned Char Serial_RxByte ( void )
Parameters
None.
Return Value
Byte received from the serial interface.
This function performs similarly as Serial_CRx ( U08 &cbyte, 1 ) but has much less overhead. Use this
API when performance optimization is required yet only one byte can be read at a time.
4.2.7 USB API – Available with 64K Flash version of the 73S12xxF
This API manages the USB interface which is compatible with the USB Specifications 2.0 – Full
Speed/12Mbps. The USB protocol Suspend, Resume and Reset operations are managed by this API.
The API includes:
•
(page 43)
•
(page 49)
•
(page 49)
•
(page 49)
•
(page 50)
•
(page 50)