This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TM4C1290NCPDT: Missing "tCDCSerInstance sPrivateData" in example code and TivaWare USB Library User's Guide

Part Number: TM4C1290NCPDT

Tool/software: Code Composer Studio

In the USB example code, and in the TivaWare USB Library User's Guide, the tUSBDCDCDevice structure at the end of the structure is missing from the definition of tUSBDCDCDevice typedef in usbdcdc.h

If I include the "sPrivateData" in my definition it is "Not Found".  ???

Thanks, Doug

  • Hello Doug,

    The definition for tCDCSerInstance is in usbdcdc.h as well:

    //*****************************************************************************
    //
    // PRIVATE
    //
    // This structure defines the private instance data and state variables for the
    // CDC Serial device.  The memory for this structure is allocated in the
    // tUSBDCDCDevice structure passed on USBDCDCInit().
    //
    //*****************************************************************************
    typedef struct
    {
        //
        // Base address for the USB controller.
        //
        uint32_t ui32USBBase;
    
        //
        // The device info to interact with the lower level DCD code.
        //
        tDeviceInfo sDevInfo;
    
        //
        // The state of the serial receive state.
        //
        volatile tCDCState iCDCRxState;
    
        //
        // The state of the serial transmit state.
        //
        volatile tCDCState iCDCTxState;
    
        //
        // The state of the serial request state.
        //
        volatile tCDCState iCDCRequestState;
    
        //
        // The state of the serial interrupt state.
        //
        volatile tCDCState iCDCInterruptState;
    
        //
        // The current pending request.
        //
        volatile uint8_t ui8PendingRequest;
    
        //
        // The current break duration used during send break requests.
        //
        uint16_t ui16BreakDuration;
    
        //
        // The current line control state for the serial port.
        //
        uint16_t ui16ControlLineState;
    
        //
        // The general serial state.
        //
        uint16_t ui16SerialState;
    
        //
        // State of any pending operations that could not be handled immediately
        // upon receipt.
        //
        volatile uint16_t ui16DeferredOpFlags;
    
        //
        // Size of the last transmit.
        //
        uint16_t ui16LastTxSize;
    
        //
        // The current serial line coding.
        //
        tLineCoding sLineCoding;
    
        //
        // Serial port receive is blocked.
        //
        volatile bool bRxBlocked;
    
        //
        // Serial control port is blocked.
        //
        volatile bool bControlBlocked;
    
        //
        // The connection status of the device.
        //
        volatile bool bConnected;
    
        //
        // The control endpoint number, this is modified in composite devices.
        //
        uint8_t ui8ControlEndpoint;
    
        //
        // The IN endpoint number, this is modified in composite devices.
        //
        uint8_t ui8BulkINEndpoint;
    
        //
        // The OUT endpoint number, this is modified in composite devices.
        //
        uint8_t ui8BulkOUTEndpoint;
    
        //
        // The interface number for the control interface, this is modified in
        // composite devices.
        //
        uint8_t ui8InterfaceControl;
    
        //
        // The interface number for the data interface, this is modified in
        // composite devices.
        //
        uint8_t ui8InterfaceData;
    }
    tCDCSerInstance;

    sPrivateData is the variable name used in the tUSBDCDCDevice definition. You'd need to define your version of the variable first before trying to use it. How are you going about including it?

  • Wow, this definition is totally different from the ones in the TivaWare documentation. ???  What am I supposed to be using with TivaWare 2.1.4.178 ??

    Thanks.

  • Hello Doug,

    Can you elaborate more on what you mean? Are you upgrading from an older TivaWare? Which documentation are you referring to that it is different? Have you reviewed the contents of your usbdcdc.h file?

  • Oops, my mistake Ralph, I confused the tCDCSerInstance typedef with tUSBDCDCDevice.

    Doug

  • Hello Ralph,

    RE the g_sCDCInstance you asked about earlier, I don't know, this was in the example code that I'm trying to get running.

    Doug

  • Hello Doug,

    I don't recall asking about g_sCDCInstance?