![]() |
![]() |
This file contains device object data structure - a structure which is a wrapper that encapsulates the driver components used to manage a single device controller. More...
#include "usb_spec_defines.h"Data Structures | |
| struct | usbConfigSection |
| declaration of Generic usb request. More... | |
| struct | usbConfigHeader |
| This is the top level structure defining a USB device configuration descriptor. A configuration descriptor contains a collection of device- specific descriptors in addition to the basic config, interface and endpoint descriptors. To allow flexibility in constructing the configuration, the descriptor is described in terms of a list of data blocks. The first block must contain the configuration descriptor itself and the following blocks are appended to this in order to produce the full descriptor sent to the host in response to a GetDescriptor request for the configuration descriptor. More... | |
| struct | usbDescriptor |
| USB descriptor structure which presents a combined view of all descriptors used by a gadget/host. This data structure is common to both host and device stacks.In the host case , the protocol core would copy the descriptors received by the host into this structure. In the gadget stack , the function/gadget driver populates this structure. More... | |
| struct | usbClassAction |
| Gadget action object structure which compiles a list of actions that can be performed on any USB function or pGadget. These functions would be called by the gadget driver. More... | |
| struct | usbClassObj |
| This structure defines the generic USB class object which is used by the protocol layer ot interact with the required class driver. The class needs to register with the protocol layer before this object can be used. More... | |
| struct | usbDevEndptInfo |
| This structure defines the configurable paramters of an endpoint. The protocol core is expected to call the config routine with this structure populated as many times as there are endpoints. More... | |
| struct | usbDmaEvt |
| Structure containing information regarding system DMA events. More... | |
| struct | usbDevEvt |
| Structure containing information regarding events that can be raised by the device control driver. More... | |
| struct | usbDevChara |
| Function pointer to function which is used by the core to set device charectristics such as device speed, device address,Number of endpoints required and their endpoint numbers. Fifo config must be done by dcd. More... | |
| struct | usbDevRequest |
| USB request structure which encapsulates information required by the dcd to genererate USB traffic. More... | |
| struct | usbDevCoreCallback |
| Device object core call back functions which would be used by dcds to to communicate with the device protocol core - (device manager block being a part of it). More... | |
| struct | usbDevDcdAction |
| Dcd driver actions Structure which collates all actions required by the dcds to implement The protocol core call these actions to generate USB traffic. More... | |
| struct | usbDcd |
| struct | usbGadgetObj |
| Device object structure which holds information related to a particular device controller - which assumes the role of one device. More... | |
Macros | |
| #define | MAX_GADGET_EVENTS (32U) |
| Maximum number of gadget events that can be stored in the event Array. TBD - make this a list. More... | |
| #define | MAX_DMA_EVENTS (1U) |
| Max number of system DMA buffer Events. | |
| #define | MAX_NUM_REQUESTS (32U) |
| Maximum number of DMA events. | |
Typedefs | |
| typedef struct usbDevRequest | usbEndpt0Request_t |
| Forward declaration of dcd object . | |
| typedef struct usbDevRequest | usbEndptRequest_t |
| declaration of EP0 request. | |
| typedef struct usbConfigSection | usbConfigSection_t |
| declaration of Generic usb request. More... | |
| typedef struct usbConfigHeader | usbConfigHeader_t |
| This is the top level structure defining a USB device configuration descriptor. A configuration descriptor contains a collection of device- specific descriptors in addition to the basic config, interface and endpoint descriptors. To allow flexibility in constructing the configuration, the descriptor is described in terms of a list of data blocks. The first block must contain the configuration descriptor itself and the following blocks are appended to this in order to produce the full descriptor sent to the host in response to a GetDescriptor request for the configuration descriptor. | |
| typedef struct usbDescriptor | usbDescriptor_t |
| USB descriptor structure which presents a combined view of all descriptors used by a gadget/host. This data structure is common to both host and device stacks.In the host case , the protocol core would copy the descriptors received by the host into this structure. In the gadget stack , the function/gadget driver populates this structure. | |
| typedef enum usbEndpt0event | usbEndpt0event_t |
| structure defining possible events on Endpoint zero . DCD would uses these events to communicate to the protocol Core. | |
| typedef enum usbGenericEvent | usbGenericEvent_t |
| structure defining possible events on all other endpoints. DCD would uses these events to communicate to the protocol Core. | |
| typedef enum usbDeviceState | usbDeviceState_t |
| Enum containing current state of the Gadget. | |
| typedef struct usbClassAction | usbClassAction_t |
| Gadget action object structure which compiles a list of actions that can be performed on any USB function or pGadget. These functions would be called by the gadget driver. | |
| typedef struct usbClassObj | usbClassObj_t |
| This structure defines the generic USB class object which is used by the protocol layer ot interact with the required class driver. The class needs to register with the protocol layer before this object can be used. | |
| typedef struct usbDevEndptInfo | usbDevEndptInfo_t |
| This structure defines the configurable paramters of an endpoint. The protocol core is expected to call the config routine with this structure populated as many times as there are endpoints. | |
| typedef struct usbDmaEvt | usbDmaEvt_t |
| Structure containing information regarding system DMA events. | |
| typedef struct usbDevEvt | usbDevEvt_t |
| Structure containing information regarding events that can be raised by the device control driver. | |
| typedef enum usbDeviceDcdChara | usbDeviceDcdChara_t |
| This enum selcts the param the core wants the dcd to set. Initially the core sets the device speed and dsiables remote wake up. | |
| typedef struct usbDevChara | usbDevChara_t |
| Function pointer to function which is used by the core to set device charectristics such as device speed, device address,Number of endpoints required and their endpoint numbers. Fifo config must be done by dcd. | |
| typedef struct usbDevRequest | usbDevRequest_t |
| USB request structure which encapsulates information required by the dcd to genererate USB traffic. | |
| typedef struct usbDevCoreCallback | usbDevCoreCallback_t |
| Device object core call back functions which would be used by dcds to to communicate with the device protocol core - (device manager block being a part of it). | |
| typedef struct usbDevDcdAction | usbDevDcdAction_t |
| Dcd driver actions Structure which collates all actions required by the dcds to implement The protocol core call these actions to generate USB traffic. | |
| typedef struct usbDcd | usbDcd_t |
| typedef struct usbGadgetObj | usbGadgetObj_t |
| Device object structure which holds information related to a particular device controller - which assumes the role of one device. | |
This file contains device object data structure - a structure which is a wrapper that encapsulates the driver components used to manage a single device controller.
| #define MAX_GADGET_EVENTS (32U) |
Maximum number of gadget events that can be stored in the event Array. TBD - make this a list.
Copyright (c) Texas Instruments Incorporated 2015-2016
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| typedef struct usbConfigSection usbConfigSection_t |
declaration of Generic usb request.
This structure defines the contiguous block of data which contains a group of descriptors that form a part of a contiguous descriptor for a device. It is assumed that a config section contains only whole descriptors. It is not valid to split a single descriptor across multiple sections.
Sample Device controller object - each Device controller instance would create an instance and register with the core
| enum usbDeviceDcdChara |
This enum selcts the param the core wants the dcd to set. Initially the core sets the device speed and dsiables remote wake up.
| enum usbDeviceState |
Enum containing current state of the Gadget.
| enum usbEndpt0event |
structure defining possible events on Endpoint zero . DCD would uses these events to communicate to the protocol Core.
| enum usbGenericEvent |
structure defining possible events on all other endpoints. DCD would uses these events to communicate to the protocol Core.