Commit 9464fa16 authored by Dean Camera's avatar Dean Camera
Browse files

Renamed ENDPOINT_DOUBLEBANK_SUPPORTED() to ENDPOINT_BANKS_SUPPORTED() and...

Renamed ENDPOINT_DOUBLEBANK_SUPPORTED() to ENDPOINT_BANKS_SUPPORTED() and changed it to return the maximum number of supported banks for the given endpoint.
parent 421479a4
...@@ -211,9 +211,9 @@ ...@@ -211,9 +211,9 @@
* \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or
* the call will fail. * the call will fail.
* *
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state.
* \param[in] Data Pointer to the string to send to the host. * \param[in] Data Pointer to the string to send to the host.
* \param[in] Length Size in bytes of the string to send to the host. * \param[in] Length Size in bytes of the string to send to the host.
* *
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/ */
......
...@@ -93,30 +93,30 @@ ...@@ -93,30 +93,30 @@
/* Macros: */ /* Macros: */
#define _ENDPOINT_GET_MAXSIZE(EPIndex) _ENDPOINT_GET_MAXSIZE2(ENDPOINT_DETAILS_EP ## EPIndex) #define _ENDPOINT_GET_MAXSIZE(EPIndex) _ENDPOINT_GET_MAXSIZE2(ENDPOINT_DETAILS_EP ## EPIndex)
#define _ENDPOINT_GET_MAXSIZE2(EPDetails) _ENDPOINT_GET_MAXSIZE3(EPDetails) #define _ENDPOINT_GET_MAXSIZE2(EPDetails) _ENDPOINT_GET_MAXSIZE3(EPDetails)
#define _ENDPOINT_GET_MAXSIZE3(MaxSize, DB) (MaxSize) #define _ENDPOINT_GET_MAXSIZE3(MaxSize, Banks) (MaxSize)
#define _ENDPOINT_GET_DOUBLEBANK(EPIndex) _ENDPOINT_GET_DOUBLEBANK2(ENDPOINT_DETAILS_EP ## EPIndex) #define _ENDPOINT_GET_BANKS(EPIndex) _ENDPOINT_GET_BANKS2(ENDPOINT_DETAILS_EP ## EPIndex)
#define _ENDPOINT_GET_DOUBLEBANK2(EPDetails) _ENDPOINT_GET_DOUBLEBANK3(EPDetails) #define _ENDPOINT_GET_BANKS2(EPDetails) _ENDPOINT_GET_BANKS3(EPDetails)
#define _ENDPOINT_GET_DOUBLEBANK3(MaxSize, DB) (DB) #define _ENDPOINT_GET_BANKS3(MaxSize, Banks) (Banks)
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
#define ENDPOINT_DETAILS_MAXEP 7 #define ENDPOINT_DETAILS_MAXEP 7
#define ENDPOINT_DETAILS_EP0 64, true #define ENDPOINT_DETAILS_EP0 64, 2
#define ENDPOINT_DETAILS_EP1 256, true #define ENDPOINT_DETAILS_EP1 256, 2
#define ENDPOINT_DETAILS_EP2 64, true #define ENDPOINT_DETAILS_EP2 64, 2
#define ENDPOINT_DETAILS_EP3 64, true #define ENDPOINT_DETAILS_EP3 64, 2
#define ENDPOINT_DETAILS_EP4 64, true #define ENDPOINT_DETAILS_EP4 64, 2
#define ENDPOINT_DETAILS_EP5 64, true #define ENDPOINT_DETAILS_EP5 64, 2
#define ENDPOINT_DETAILS_EP6 64, true #define ENDPOINT_DETAILS_EP6 64, 2
#else #else
#define ENDPOINT_DETAILS_MAXEP 5 #define ENDPOINT_DETAILS_MAXEP 5
#define ENDPOINT_DETAILS_EP0 64, true #define ENDPOINT_DETAILS_EP0 64, 2
#define ENDPOINT_DETAILS_EP1 64, false #define ENDPOINT_DETAILS_EP1 64, 1
#define ENDPOINT_DETAILS_EP2 64, false #define ENDPOINT_DETAILS_EP2 64, 1
#define ENDPOINT_DETAILS_EP3 64, true #define ENDPOINT_DETAILS_EP3 64, 2
#define ENDPOINT_DETAILS_EP4 64, true #define ENDPOINT_DETAILS_EP4 64, 2
#endif #endif
/* Inline Functions: */ /* Inline Functions: */
...@@ -203,11 +203,11 @@ ...@@ -203,11 +203,11 @@
*/ */
#define ENDPOINT_MAX_SIZE(EPIndex) _ENDPOINT_GET_MAXSIZE(EPIndex) #define ENDPOINT_MAX_SIZE(EPIndex) _ENDPOINT_GET_MAXSIZE(EPIndex)
/** Indicates if the given endpoint supports double banking. /** Indicates the total number of banks supported by the given endpoint.
* *
* \param[in] EPIndex Endpoint number, a value between 0 and (ENDPOINT_TOTAL_ENDPOINTS - 1) * \param[in] EPIndex Endpoint number, a value between 0 and (ENDPOINT_TOTAL_ENDPOINTS - 1)
*/ */
#define ENDPOINT_DOUBLEBANK_SUPPORTED(EPIndex) _ENDPOINT_GET_DOUBLEBANK(EPIndex) #define ENDPOINT_BANKS_SUPPORTED(EPIndex) _ENDPOINT_GET_BANKS(EPIndex)
#if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__) #if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__)
/** Total number of endpoints (including the default control endpoint at address 0) which may /** Total number of endpoints (including the default control endpoint at address 0) which may
......
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
* - Changed default value for the reset polarity parameter in the AVRISP-MKII project so that it defaults to active low drive * - Changed default value for the reset polarity parameter in the AVRISP-MKII project so that it defaults to active low drive
* - Changed configuration descriptor parser for all host mode projects and class drivers to ensure better compatibility with devices * - Changed configuration descriptor parser for all host mode projects and class drivers to ensure better compatibility with devices
* - Moved the USB mode specifier constants into a new enum, so that they are semantically related to one another * - Moved the USB mode specifier constants into a new enum, so that they are semantically related to one another
* - Renamed ENDPOINT_DOUBLEBANK_SUPPORTED() to ENDPOINT_BANKS_SUPPORTED() and changed it to return the maximum number of supported banks for
* the given endpoint
* *
* <b>Fixed:</b> * <b>Fixed:</b>
* - Fixed USB_GetHIDReportItemInfo() function modifying the given report item's data when the report item does not exist * - Fixed USB_GetHIDReportItemInfo() function modifying the given report item's data when the report item does not exist
......
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
* eliminate any casting of descriptor pointers to a non-const pointer. * eliminate any casting of descriptor pointers to a non-const pointer.
* - The names of the class specific descriptor type defines in the USB Class drivers have changed - refer to the driver documentation * - The names of the class specific descriptor type defines in the USB Class drivers have changed - refer to the driver documentation
* for each class driver for the new class specific descriptor type names. * for each class driver for the new class specific descriptor type names.
* - The ENDPOINT_DOUBLEBANK_SUPPORTED() macro is has been renamed \ref ENDPOINT_BANKS_SUPPORTED() and now returns the total number of
* banks supported by the given endpoint. Existing code should switch to the new naming scheme, and test that the return value of the
* macro is equal to or greated than 2 to regain the previous functionality.
* *
* <b>Host Mode</b> * <b>Host Mode</b>
* - Pipes MUST be allocated in ascending order to ensure that bank corruption does not occur. Ensure that your user application * - Pipes MUST be allocated in ascending order to ensure that bank corruption does not occur. Ensure that your user application
......
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