USB Library
mUSBUSARTTxRom Macro
Syntax
#define mUSBUSARTTxRom(pData,len) \
{                                   \
    pCDCSrc.bRom = pData;           \
    cdc_tx_len = len;               \
    cdc_mem_type = USB_EP0_ROM;     \
    cdc_trf_state = CDC_TX_BUSY;    \
}
Description

Use this macro to transfer data located in program memory. Use this macro when:

  1. Data stream is not null-terminated
  2. Transfer length is known
 

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);
    }
Preconditions

cdc_trf_state must be in the CDC_TX_READY state. Value of 'len' must be equal to or smaller than 255 bytes.

Parameters
Parameters 
Description 
pDdata 
Pointer to the starting location of data bytes 
len 
Number of bytes to be transferred 
Remarks

This macro only handles the setup of the transfer. The actual transfer is handled by CDCTxService().

MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla