#define mUSBUSARTTxRom(pData,len) \ { \ pCDCSrc.bRom = pData; \ cdc_tx_len = len; \ cdc_mem_type = USB_EP0_ROM; \ cdc_trf_state = CDC_TX_BUSY; \ }
Use this macro to transfer data located in program memory. Use this macro when:
Remember: cdc_trf_state must == CDC_TX_READY Unlike putrsUSBUSART, there is not code double checking the transfer state. Unexpected behavior will occur if this function is called when cdc_trf_state != CDC_TX_READY
Typical Usage:
if(USBUSARTIsTxTrfReady()) { mUSBUSARTTxRom(&SomeRomString[0], 200); }
cdc_trf_state must be in the CDC_TX_READY state. Value of 'len' must be equal to or smaller than 255 bytes.
Parameters |
Description |
pDdata |
Pointer to the starting location of data bytes |
len |
Number of bytes to be transferred |
This macro only handles the setup of the transfer. The actual transfer is handled by CDCTxService().
MLA - USB Library Help Version : 2.16
![]() |