Instruction Manual

78M6612 M-API Library User Guide UG_6612_036
40 Rev. 1.00
4.9.3 MAPI_TxLen()
Purpose Number of bytes transmitted thus far.
Synopsis Unsigned integer MAPI_ TxLen ( void )
Parameters None.
Return Value Unsigned integer specifying the number of bytes left in the Tx buffer, i.e. the
remaining bytes to be sent.
4.9.4 MAPI_UARTRx()
Purpose Setup the receive buffer and start receiving. Always call this function after
MAPI_UARTInit() to make sure the receive buffer is available. Subsequent
call to this API will append the data to the existing buffer queue, if data is being
received. This is a non-blocking call so always check for completion of the
reception by calling MAPI_RxLen().
Synopsis uint16_t MAPI_UARTRx ( 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 Codes Unsigned integer specifying the number of bytes fetched thus far. Use
MAPI_RxLen() to keep track of the remaining number of bytes unfetched in the
Rx buffer.
4.9.5 MAPI_RxLen()
Purpose Number of bytes received thus far.
Synopsis Unsigned Integer MAPI_ RxLen ( void )
Parameters None.
Return Value Unsigned integer specifying the number of bytes in the queued buffer.