Commit f7ab433c authored by Dean Camera's avatar Dean Camera
Browse files

Add optional double-banking support to the Device mode Class Drivers, on a...

Add optional double-banking support to the Device mode Class Drivers, on a per-endpoint, per-interface level.
parent 1c7aa685
......@@ -70,9 +70,11 @@
uint8_t DataINEndpointNumber; /**< Endpoint number of the incomming MIDI data, if available (zero if unused) */
uint16_t DataINEndpointSize; /**< Size in bytes of the incomming MIDI data endpoint, if available (zero if unused) */
bool DataINEndpointDoubleBank; /** Indicates if the MIDI interface's IN data endpoint should use double banking */
uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI data, if available (zero if unused) */
uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI data endpoint, if available (zero if unused) */
bool DataOUTEndpointDoubleBank; /** Indicates if the MIDI interface's IN data endpoint should use double banking */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
......
......@@ -78,14 +78,14 @@ bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
if (!(Endpoint_ConfigureEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,
ENDPOINT_DIR_IN, MSInterfaceInfo->Config.DataINEndpointSize,
ENDPOINT_BANK_SINGLE)))
MSInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
if (!(Endpoint_ConfigureEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,
ENDPOINT_DIR_OUT, MSInterfaceInfo->Config.DataOUTEndpointSize,
ENDPOINT_BANK_SINGLE)))
MSInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
......
......@@ -69,9 +69,11 @@
uint8_t DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint */
uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint */
bool DataINEndpointDoubleBank; /** Indicates if the Mass Storage interface's IN data endpoint should use double banking */
uint8_t DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint */
uint16_t DataOUTEndpointSize; /**< Size in bytes of the Mass Storage interface's OUT data endpoint */
bool DataOUTEndpointDoubleBank; /** Indicates if the Mass Storage interface's OUT data endpoint should use double banking */
uint8_t TotalLUNs; /**< Total number of logical drives in the Mass Storage interface */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
......
......@@ -116,21 +116,21 @@ bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISIn
if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,
ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.DataINEndpointSize,
ENDPOINT_BANK_SINGLE)))
RNDISInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,
ENDPOINT_DIR_OUT, RNDISInterfaceInfo->Config.DataOUTEndpointSize,
ENDPOINT_BANK_SINGLE)))
RNDISInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.NotificationEndpointNumber, EP_TYPE_INTERRUPT,
ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.NotificationEndpointSize,
ENDPOINT_BANK_SINGLE)))
RNDISInterfaceInfo->Config.NotificationEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
......
......@@ -70,12 +70,15 @@
uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */
uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */
bool DataINEndpointDoubleBank; /** Indicates if the RNDIS interface's IN data endpoint should use double banking */
uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */
uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */
bool DataOUTEndpointDoubleBank; /** Indicates if the RNDIS interface's OUT data endpoint should use double banking */
uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */
uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */
bool NotificationEndpointDoubleBank; /** Indicates if the RNDIS interface's notification endpoint should use double banking */
char* AdapterVendorDescription; /**< String description of the adapter vendor */
MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter */
......
......@@ -18,6 +18,7 @@
* - Added new Joystick Host ClassDriver and LowLevel demos
* - Added new Printer Host mode Class driver
* - Added new Printer Host mode ClassDriver demo
* - Added optional support for double banked endpoints in the Device mode Class drivers
*
* <b>Changed:</b>
* - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for sytax errors in the library
......
......@@ -24,6 +24,7 @@
* - Add RNDIS Host Class driver
* - Add unit testing to APIs
* - Add board overviews
* - Add resume interrupt support
* - Make new demos
* -# Keyboard/Mouse Dual Class Host
* -# Multiple-Report HID device
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment