forked from mirror/qmk_firmware
Rename TOTAL_NUM_CONFIGURATIONS to FIXED_NUM_CONFIGURATIONS, to match the existing FIXED_CONTROL_ENDPOINT_SIZE compile time option. Add FIXED_NUM_CONFIGURATIONS to the descriptors of each project using the option.
This commit is contained in:
@@ -136,8 +136,8 @@ void HID_Device_ProcessControlPacket(USB_ClassInfo_HID_Device_t* const HIDInterf
|
||||
bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
|
||||
{
|
||||
memset(&HIDInterfaceInfo->State, 0x00, sizeof(HIDInterfaceInfo->State));
|
||||
HIDInterfaceInfo->State.IdleCount = 500;
|
||||
HIDInterfaceInfo->State.UsingReportProtocol = true;
|
||||
HIDInterfaceInfo->State.IdleCount = 500;
|
||||
|
||||
if (!(Endpoint_ConfigureEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber, EP_TYPE_INTERRUPT,
|
||||
ENDPOINT_DIR_IN, HIDInterfaceInfo->Config.ReportINEndpointSize, ENDPOINT_BANK_SINGLE)))
|
||||
|
||||
@@ -141,8 +141,8 @@ static void USB_Device_SetConfiguration(void)
|
||||
{
|
||||
bool AlreadyConfigured = (USB_ConfigurationNumber != 0);
|
||||
|
||||
#if defined(TOTAL_NUM_CONFIGURATIONS)
|
||||
if ((uint8_t)USB_ControlRequest.wValue > TOTAL_NUM_CONFIGURATIONS)
|
||||
#if defined(FIXED_NUM_CONFIGURATIONS)
|
||||
if ((uint8_t)USB_ControlRequest.wValue > FIXED_NUM_CONFIGURATIONS)
|
||||
return;
|
||||
#else
|
||||
#if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/* Public Interface - May be used in end-application: */
|
||||
/* Macros: */
|
||||
#if defined(USE_SINGLE_DEVICE_CONFIGURATION)
|
||||
#define TOTAL_NUM_CONFIGURATIONS 1
|
||||
#define FIXED_NUM_CONFIGURATIONS 1
|
||||
#endif
|
||||
|
||||
/* Enums: */
|
||||
|
||||
Reference in New Issue
Block a user