void putUSBUSART( uint8_t * data, uint8_t Length );
putUSBUSART writes an array of data to the USB. Use this version, is capable of transferring 0x00 (what is typically a NULL character in any of the string transfer functions).
Typical Usage:
if(USBUSARTIsTxTrfReady()) { char data[] = {0x00, 0x01, 0x02, 0x03, 0x04}; putUSBUSART(data,5); }
The transfer mechanism for device-to-host(put) is more flexible than host-to-device(get). It can handle a string of data larger than the maximum size of bulk IN endpoint. A state machine is used to transfer a long string of data over multiple USB transactions. CDCTxService() must be called periodically to keep sending blocks of data to the host.
USBUSARTIsTxTrfReady() must return true. This indicates that the last transfer is complete and is ready to receive a new block of data. The string of characters pointed to by 'data' must equal to or smaller than 255 BYTEs.
MLA - USB Library Help Version : 2.16
![]() |