Use USB_INTERFACE_ALTERNATE_SETTING_NONE wherever possible.

This commit is contained in:
László Monda
2016-03-03 21:01:14 +01:00
parent f7755b2520
commit 09e0a739e3
6 changed files with 3 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ static usb_device_endpoint_struct_t UsbGenericHidEndpoints[USB_GENERIC_HID_ENDPO
}; };
static usb_device_interface_struct_t UsbGenericHidInterface[] = {{ static usb_device_interface_struct_t UsbGenericHidInterface[] = {{
USB_GENERIC_HID_INTERFACE_ALTERNATE_SETTING, USB_INTERFACE_ALTERNATE_SETTING_NONE,
{USB_GENERIC_HID_ENDPOINT_COUNT, UsbGenericHidEndpoints}, {USB_GENERIC_HID_ENDPOINT_COUNT, UsbGenericHidEndpoints},
NULL, NULL,
}}; }};

View File

@@ -14,7 +14,6 @@
#define USB_GENERIC_HID_INTERFACE_INDEX 0 #define USB_GENERIC_HID_INTERFACE_INDEX 0
#define USB_GENERIC_HID_INTERFACE_COUNT 1 #define USB_GENERIC_HID_INTERFACE_COUNT 1
#define USB_GENERIC_HID_INTERFACE_ALTERNATE_SETTING 0
#define USB_GENERIC_HID_ENDPOINT_IN_ID 3 #define USB_GENERIC_HID_ENDPOINT_IN_ID 3
#define USB_GENERIC_HID_ENDPOINT_OUT_ID 4 #define USB_GENERIC_HID_ENDPOINT_OUT_ID 4

View File

@@ -18,7 +18,7 @@ static usb_device_endpoint_struct_t UsbKeyboardEndpoints[USB_KEYBOARD_ENDPOINT_C
}}; }};
static usb_device_interface_struct_t UsbKeyboardInterface[] = {{ static usb_device_interface_struct_t UsbKeyboardInterface[] = {{
USB_KEYBOARD_INTERFACE_ALTERNATE_SETTING, USB_INTERFACE_ALTERNATE_SETTING_NONE,
{USB_KEYBOARD_ENDPOINT_COUNT, UsbKeyboardEndpoints}, {USB_KEYBOARD_ENDPOINT_COUNT, UsbKeyboardEndpoints},
NULL, NULL,
}}; }};

View File

@@ -14,7 +14,6 @@
#define USB_KEYBOARD_INTERFACE_INDEX 1 #define USB_KEYBOARD_INTERFACE_INDEX 1
#define USB_KEYBOARD_INTERFACE_COUNT 1 #define USB_KEYBOARD_INTERFACE_COUNT 1
#define USB_KEYBOARD_INTERFACE_ALTERNATE_SETTING 0
#define USB_KEYBOARD_ENDPOINT_ID 2 #define USB_KEYBOARD_ENDPOINT_ID 2
#define USB_KEYBOARD_ENDPOINT_COUNT 1 #define USB_KEYBOARD_ENDPOINT_COUNT 1

View File

@@ -9,7 +9,7 @@ static usb_device_endpoint_struct_t UsbMouseEndpoints[USB_MOUSE_ENDPOINT_COUNT]
}}; }};
static usb_device_interface_struct_t UsbMouseInterface[] = {{ static usb_device_interface_struct_t UsbMouseInterface[] = {{
USB_MOUSE_INTERFACE_ALTERNATE_SETTING, USB_INTERFACE_ALTERNATE_SETTING_NONE,
{USB_MOUSE_ENDPOINT_COUNT, UsbMouseEndpoints}, {USB_MOUSE_ENDPOINT_COUNT, UsbMouseEndpoints},
NULL, NULL,
}}; }};

View File

@@ -9,7 +9,6 @@
#define USB_MOUSE_INTERFACE_INDEX 2 #define USB_MOUSE_INTERFACE_INDEX 2
#define USB_MOUSE_INTERFACE_COUNT 1 #define USB_MOUSE_INTERFACE_COUNT 1
#define USB_MOUSE_INTERFACE_ALTERNATE_SETTING 0
#define USB_MOUSE_ENDPOINT_ID 1 #define USB_MOUSE_ENDPOINT_ID 1
#define USB_MOUSE_ENDPOINT_COUNT 1 #define USB_MOUSE_ENDPOINT_COUNT 1