Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose DeviceID through USB descriptors in DFU mode, Microsoft WCID support #1001

Merged
merged 56 commits into from
Jun 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e8b02da
HID and CDC drivers with composite device and multi-instancing support
avtolstoy Mar 10, 2016
9f88fb6
Composite USB (CDC + HAL) for STM32F2. WIP
avtolstoy Mar 10, 2016
69b013e
Do not call SOF callbacks in classes until they have been initialized…
avtolstoy Mar 11, 2016
9b62479
FIXME: UNSIGNED Windows USB drivers with USBSerial1 support
avtolstoy Mar 11, 2016
bd98adc
New USB serial HAL stubs for non-STM32F2 platforms
avtolstoy Mar 11, 2016
be2d127
Merge remote-tracking branch 'upstream/develop' into feature/usb-comp…
avtolstoy Mar 11, 2016
0628791
USBSerial1DebugOutput
avtolstoy Mar 11, 2016
d6c3727
Merge remote-tracking branch 'upstream/develop' into feature/usb-comp…
avtolstoy Mar 19, 2016
73db84d
Electron uses USB FS pins, unlike Photon, which uses USB HS pins in F…
avtolstoy Mar 20, 2016
8a955af
USBSerial: DTR/RTS, Electron fixes
avtolstoy Apr 19, 2016
fdcdba8
Unused variable in USBD_MCDC_Change_Open_State treated as an error
avtolstoy Apr 19, 2016
0d267ce
Declare bytes2hexbuf as extern "C"
avtolstoy Apr 23, 2016
c9d83f2
Do not attach if there are no USB classes registered
avtolstoy Apr 23, 2016
30f54f5
Report DeviceId and fw version in USB descriptor. Report interface st…
avtolstoy Apr 23, 2016
bd7aa1a
Call USBD_Composite_Registered_Count with onlyActive=true
avtolstoy Apr 23, 2016
0e05a9b
USB HID interface string
avtolstoy Apr 23, 2016
cc44e63
Merge remote-tracking branch 'upstream/develop' into feature/usb-comp…
avtolstoy Apr 23, 2016
3829ead
Increase maximum USB classes count
avtolstoy Apr 24, 2016
66296c1
Move USB HAL to a separate dynalib hal_usb
avtolstoy Apr 24, 2016
2c6fefc
add usbSerialEvent1 for USBSerial1
avtolstoy Apr 24, 2016
4e9c074
acquireSerialBuffer() and acquireUSBSerial1Buffer() to override USB S…
avtolstoy Apr 24, 2016
1b838f7
Convenient macro USBSERIAL1_ENABLE() to enable USBSerial1 on startup …
avtolstoy Apr 24, 2016
ffaabfe
Comment out DEBUG lines in USB MCDC driver as this might cause a dead…
avtolstoy Apr 26, 2016
e36dc71
Compatibility with old Windows drivers
avtolstoy Apr 27, 2016
86bdf59
Added Wiring_Mouse and Wiring_Keyboard to platform header. wiring/api…
avtolstoy Apr 27, 2016
308c4cb
Merge remote-tracking branch 'upstream/develop' into feature/usb-comp…
avtolstoy Apr 27, 2016
ac11452
ISR safety-checks in HAL_USB_USART_Flush_Data and HAL_USB_USART_Send_…
avtolstoy Apr 28, 2016
9a8b787
Outdated USB functions used to detach when entering STOP mode. Replac…
avtolstoy Apr 29, 2016
8ff4970
USBSerial1 log handlers
avtolstoy May 8, 2016
26ef73e
Pre-register Serial and USBSerial1 in HAL_USB_Init
avtolstoy May 8, 2016
1827bfd
Baudrate should be optional for USBSerial::begin()
avtolstoy May 8, 2016
0d23d97
Debug build only logging for CDC driver
avtolstoy May 8, 2016
d7d2f49
In case of a failed transmission, TX ringbuffer wasn't flushed comple…
avtolstoy May 15, 2016
7e4f0a5
Report as 'Bus-powered, bMaxPower=500mA'
avtolstoy May 15, 2016
345b2c1
Remove Windows drivers from the repository
avtolstoy Jun 11, 2016
a3bca82
bcdDevice is used for hardware revision instead of firmware version
avtolstoy Jun 11, 2016
8965141
Merge remote-tracking branch 'upstream/develop' into feature/usb-comp…
avtolstoy Jun 11, 2016
0ef54c6
USB vendor-specific setup request handling
avtolstoy May 26, 2016
1d5cbed
Just in case return _strictly_ USBD_OK or USBD_FAIL in HAL_USB_Handle…
avtolstoy May 26, 2016
a43beb9
Adds vendor-specific USB interface #0
avtolstoy Jun 5, 2016
dd97335
Vendor interface #0 -> #2, additional enhancements
avtolstoy Jun 11, 2016
de20c69
Add a critical section to HAL_USB_USART_Available_Data_For_Write
avtolstoy Jun 11, 2016
8145505
Minor optimizations
avtolstoy Jun 11, 2016
ec844c1
Merge branch 'feature/usb-composite' into feature/usb-vendor-requests
avtolstoy Jun 11, 2016
23351e4
Basic SystemControlInterface implementation for handling the followin…
avtolstoy Jun 12, 2016
e3e9658
Rename 'Particle Control Interface' -> 'PRODUCT_STRING Control Interf…
avtolstoy Jun 12, 2016
6554035
include usbd_desc_device.h
avtolstoy Jun 13, 2016
e498262
Basic SystemControlInterface implementation for handling the followin…
avtolstoy Jun 13, 2016
348b952
Allow to send raw keycodes in USBKeyboard
avtolstoy Jun 13, 2016
f21a602
Retain compatibility with <0.6.0 apps
avtolstoy Jun 13, 2016
6cd1a96
Merge branch 'feature/usb-composite' into feature/usb-vendor-requests
avtolstoy Jun 13, 2016
2f7b631
Expose DeviceID and Bootloader Version through USB descriptors in DFU…
avtolstoy May 15, 2016
469634b
Add HAL_DEVICE_ID_NO_DCT flag
avtolstoy Jun 11, 2016
ef77347
bcdDevice should contain hardware revision instead of bootloader version
avtolstoy Jun 11, 2016
9f33c56
Microsoft WCID support in DFU mode
avtolstoy Jun 11, 2016
63db95f
Bump bcdDevice to avoid cache issues on Windows
avtolstoy Jun 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bootloader/import.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BOOTLOADER_MODULE_PATH ?= $(PROJECT_ROOT)/bootloader
BOOTLOADER_VERSION ?= 7
BOOTLOADER_VERSION ?= 8
BOOTLOADER_BUILD_PATH_EXT = $(BUILD_TARGET_PLATFORM)

# bring in the include folders from inc and src/<platform> is includes
Expand Down
33 changes: 33 additions & 0 deletions bootloader/src/stm32f2xx/deviceid_hal.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// pull in the sources from the HAL. It's a bit of a hack, but is simpler than trying to link the
// full hal library.
#define HAL_DEVICE_ID_NO_DCT
#include "../src/stm32f2xx/deviceid_hal.c"

// Pulled from system_cloud_internal.cpp

static inline char ascii_nibble(uint8_t nibble) {
char hex_digit = nibble + 48;
if (57 < hex_digit)
hex_digit += 7;
return hex_digit;
}

static inline char* concat_nibble(char* p, uint8_t nibble)
{
*p++ = ascii_nibble(nibble);
return p;
}

char* bytes2hexbuf(const uint8_t* buf, unsigned len, char* out)
{
unsigned i;
char* result = out;
for (i = 0; i < len; ++i)
{
concat_nibble(out, (buf[i] >> 4));
out++;
concat_nibble(out, (buf[i] & 0xF));
out++;
}
return result;
}
27 changes: 26 additions & 1 deletion bootloader/src/stm32f2xx/dfu_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ USB_OTG_CORE_HANDLE USB_OTG_dev;

/* Extern variables ----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
static uint8_t HAL_DFU_USB_Handle_Vendor_Request(USB_SETUP_REQ* req, uint8_t dataStage);
/* Private functions ---------------------------------------------------------*/

uint8_t is_application_valid(uint32_t address)
Expand All @@ -49,6 +50,21 @@ uint8_t is_application_valid(uint32_t address)
#endif
}

static void dummy(void) {}
static void dummy1(uint8_t speed) {}

USBD_Usr_cb_TypeDef DFU_USR_cb =
{
dummy, // USBD_USR_Init,
dummy1, // USBD_USR_DeviceReset,
dummy, // USBD_USR_DeviceConfigured,
dummy, // USBD_USR_DeviceSuspended,
dummy, // USBD_USR_DeviceResumed,
dummy, // USBD_USR_DeviceConnected,
dummy, // USBD_USR_DeviceDisconnected,
HAL_DFU_USB_Handle_Vendor_Request
};

/*******************************************************************************
* Function Name : HAL_DFU_USB_Init.
* Description : Initialize USB for DFU class.
Expand All @@ -65,5 +81,14 @@ void HAL_DFU_USB_Init(void)
USB_OTG_HS_CORE_ID,
#endif
&USR_desc, &DFU_cb,
NULL); // Passing NULL here to reduce bootloader flash requirements
&DFU_USR_cb); // Passing NULL here to reduce bootloader flash requirements
}

uint8_t HAL_DFU_USB_Handle_Vendor_Request(USB_SETUP_REQ* req, uint8_t dataStage) {
// Forward to DFU class driver
if (req != NULL && req->bRequest == 0xee && req->wIndex == 0x0004 && req->wValue == 0x0000) {
return DFU_cb.Setup(&USB_OTG_dev, req);
}

return USBD_FAIL;
}
93 changes: 49 additions & 44 deletions bootloader/src/stm32f2xx/usbd_desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,26 @@
#include "usbd_desc.h"
#include "usbd_req.h"
#include "usb_regs.h"
#include "usbd_wcid.h"

#include "deviceid_hal.h"
extern char* bytes2hexbuf(const uint8_t* buf, unsigned len, char* out);

#define USBD_LANGID_STRING 0x0409 //U.S. English
#define USBD_MANUFACTURER_STRING "Particle"

#define USBD_PRODUCT_HS_STRING "Photon DFU Mode"
#define USBD_SERIALNUMBER_HS_STRING "00000000010B"

#define USBD_PRODUCT_FS_STRING "Photon DFU Mode"
#define USBD_SERIALNUMBER_FS_STRING "00000000010C"
#if PLATFORM_ID == 10
# define USBD_PRODUCT_NAME "Electron"
#elif PLATFORM_ID == 8
# define USBD_PRODUCT_NAME "P1"
#else
# define USBD_PRODUCT_NAME "Photon"
#endif
#define USBD_PRODUCT_STRING USBD_PRODUCT_NAME " " "DFU Mode"
#define USBD_CONFIGURATION_STRING "DFU"
#define USBD_INTERFACE_STRING "DFU"

#define USBD_CONFIGURATION_HS_STRING "DFU Config"
#define USBD_INTERFACE_HS_STRING "DFU Interface"

#define USBD_CONFIGURATION_FS_STRING "DFU Config"
#define USBD_INTERFACE_FS_STRING "DFU Interface"
static uint8_t * USBD_USR_MsftStrDescriptor( uint8_t speed , uint16_t *length);

USBD_DEVICE USR_desc =
{
Expand All @@ -56,6 +61,7 @@ USBD_DEVICE USR_desc =
USBD_USR_SerialStrDescriptor,
USBD_USR_ConfigStrDescriptor,
USBD_USR_InterfaceStrDescriptor,
USBD_USR_MsftStrDescriptor
};

/* USB Standard Device Descriptor */
Expand All @@ -73,8 +79,8 @@ uint8_t USBD_DeviceDesc[USB_SIZ_DEVICE_DESC] =
HIBYTE(USBD_VID_SPARK), /*idVendor*/
LOBYTE(USBD_PID_DFU), /*idProduct*/
HIBYTE(USBD_PID_DFU), /*idProduct*/
0x00, /*bcdDevice rel. 2.00*/
0x02,
LOBYTE(0x0250), /*bcdDevice (2.50) */
HIBYTE(0x0250), /*bcdDevice (2.50) */
USBD_IDX_MFC_STR, /*Index of manufacturer string*/
USBD_IDX_PRODUCT_STR, /*Index of product string*/
USBD_IDX_SERIAL_STR, /*Index of serial number string*/
Expand Down Expand Up @@ -105,6 +111,15 @@ uint8_t USBD_LangIDDesc[USB_SIZ_STRING_LANGID] =
HIBYTE(USBD_LANGID_STRING),
};

/* MS OS String Descriptor */
static const uint8_t USBD_MsftStrDesc[] = {
USB_WCID_MS_OS_STRING_DESCRIPTOR(
// "MSFT100"
USB_WCID_DATA('M', '\0', 'S', '\0', 'F', '\0', 'T', '\0', '1', '\0', '0', '\0', '0', '\0'),
0xee
)
};

/**
* @brief USBD_USR_DeviceDescriptor
* return the device descriptor
Expand Down Expand Up @@ -140,14 +155,7 @@ uint8_t * USBD_USR_LangIDStrDescriptor( uint8_t speed , uint16_t *length)
*/
uint8_t * USBD_USR_ProductStrDescriptor( uint8_t speed , uint16_t *length)
{
if(speed == USB_OTG_SPEED_HIGH)
{
USBD_GetString (USBD_PRODUCT_HS_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString (USBD_PRODUCT_FS_STRING, USBD_StrDesc, length);
}
USBD_GetString (USBD_PRODUCT_STRING, USBD_StrDesc, length);
return USBD_StrDesc;
}

Expand All @@ -173,14 +181,12 @@ uint8_t * USBD_USR_ManufacturerStrDescriptor( uint8_t speed , uint16_t *length)
*/
uint8_t * USBD_USR_SerialStrDescriptor( uint8_t speed , uint16_t *length)
{
if(speed == USB_OTG_SPEED_HIGH)
{
USBD_GetString (USBD_SERIALNUMBER_HS_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString (USBD_SERIALNUMBER_FS_STRING, USBD_StrDesc, length);
}
uint8_t deviceId[16];
char deviceIdHex[sizeof(deviceId) * 2 + 1] = {0};
unsigned deviceIdLen = 0;
deviceIdLen = HAL_device_ID(deviceId, sizeof(deviceId));
bytes2hexbuf(deviceId, deviceIdLen, deviceIdHex);
USBD_GetString (deviceIdHex, USBD_StrDesc, length);
return USBD_StrDesc;
}

Expand All @@ -193,14 +199,7 @@ uint8_t * USBD_USR_SerialStrDescriptor( uint8_t speed , uint16_t *length)
*/
uint8_t * USBD_USR_ConfigStrDescriptor( uint8_t speed , uint16_t *length)
{
if(speed == USB_OTG_SPEED_HIGH)
{
USBD_GetString (USBD_CONFIGURATION_HS_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString (USBD_CONFIGURATION_FS_STRING, USBD_StrDesc, length);
}
USBD_GetString (USBD_CONFIGURATION_STRING, USBD_StrDesc, length);
return USBD_StrDesc;
}

Expand All @@ -213,13 +212,19 @@ uint8_t * USBD_USR_ConfigStrDescriptor( uint8_t speed , uint16_t *length)
*/
uint8_t * USBD_USR_InterfaceStrDescriptor( uint8_t speed , uint16_t *length)
{
if(speed == USB_OTG_SPEED_HIGH)
{
USBD_GetString (USBD_INTERFACE_HS_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString (USBD_INTERFACE_FS_STRING, USBD_StrDesc, length);
}
USBD_GetString (USBD_INTERFACE_STRING, USBD_StrDesc, length);
return USBD_StrDesc;
}

/**
* @brief USBD_USR_MsftStrDescriptor
* return MS OS String Descriptor
* @param speed : current device speed
* @param length : pointer to data length variable
* @retval pointer to descriptor buffer
*/
uint8_t * USBD_USR_MsftStrDescriptor( uint8_t speed , uint16_t *length)
{
*length = sizeof(USBD_MsftStrDesc);
return (uint8_t*)USBD_MsftStrDesc;
}
1 change: 1 addition & 0 deletions hal-dynalib/src/hal_usb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "hal_dynalib_usb.h"
1 change: 1 addition & 0 deletions hal/inc/hal_dynalib_usart.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ DYNALIB_FN(BASE_IDX2 + 1, hal_usart, HAL_USART_Write_NineBitData, uint32_t(HAL_U
DYNALIB_FN(BASE_IDX2 + 2, hal_usart, HAL_USART_Send_Break, void(HAL_USART_Serial, void*))
DYNALIB_FN(BASE_IDX2 + 3, hal_usart, HAL_USART_Break_Detected, uint8_t(HAL_USART_Serial))


DYNALIB_END(hal_usart)

#undef BASE_IDX
Expand Down
80 changes: 80 additions & 0 deletions hal/inc/hal_dynalib_usb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/**
******************************************************************************
* @file hal_dynalib_usb.h
* @authors Andrey Tolstoy
* @date 24 April 2016
******************************************************************************
Copyright (c) 2016 Particle Industries, Inc. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
******************************************************************************
*/

#ifndef HAL_DYNALIB_USB_H
#define HAL_DYNALIB_USB_H

#include "dynalib.h"
#include "usb_config_hal.h"

#ifdef DYNALIB_EXPORT
#include "usb_hal.h"
#endif

DYNALIB_BEGIN(hal_usb)

#ifdef USB_CDC_ENABLE
DYNALIB_FN(0, hal_usb, HAL_USB_USART_Init, void(HAL_USB_USART_Serial, const HAL_USB_USART_Config*))
DYNALIB_FN(1, hal_usb, HAL_USB_USART_Begin, void(HAL_USB_USART_Serial, uint32_t, void *))
DYNALIB_FN(2, hal_usb, HAL_USB_USART_End, void(HAL_USB_USART_Serial))
DYNALIB_FN(3, hal_usb, HAL_USB_USART_Baud_Rate, unsigned int(HAL_USB_USART_Serial))
DYNALIB_FN(4, hal_usb, HAL_USB_USART_Available_Data, int32_t(HAL_USB_USART_Serial))
DYNALIB_FN(5, hal_usb, HAL_USB_USART_Available_Data_For_Write, int32_t(HAL_USB_USART_Serial))
DYNALIB_FN(6, hal_usb, HAL_USB_USART_Receive_Data, int32_t(HAL_USB_USART_Serial, uint8_t))
DYNALIB_FN(7, hal_usb, HAL_USB_USART_Send_Data, int32_t(HAL_USB_USART_Serial, uint8_t))
DYNALIB_FN(8, hal_usb, HAL_USB_USART_Flush_Data, void(HAL_USB_USART_Serial))
DYNALIB_FN(9, hal_usb, HAL_USB_USART_Is_Enabled, bool(HAL_USB_USART_Serial))
DYNALIB_FN(10, hal_usb, HAL_USB_USART_Is_Connected, bool(HAL_USB_USART_Serial))
#define BASE_IDX 11
#else
#define BASE_IDX 0
#endif

#ifdef USB_HID_ENABLE
DYNALIB_FN(BASE_IDX + 0, hal_usb, HAL_USB_HID_Init, void(uint8_t, void*))
DYNALIB_FN(BASE_IDX + 1, hal_usb, HAL_USB_HID_Begin, void(uint8_t, void*))
DYNALIB_FN(BASE_IDX + 2, hal_usb, HAL_USB_HID_Send_Report, void(uint8_t, void*, uint16_t, void*))
DYNALIB_FN(BASE_IDX + 3, hal_usb, HAL_USB_HID_End, void(uint8_t))
# define BASE_IDX1 (BASE_IDX + 4)
#else
# define BASE_IDX1 BASE_IDX
#endif

#if defined(USB_CDC_ENABLE) || defined(USB_HID_ENABLE)
DYNALIB_FN(BASE_IDX1 + 0, hal_usb, HAL_USB_Init, void(void))
DYNALIB_FN(BASE_IDX1 + 1, hal_usb, HAL_USB_Attach, void(void))
DYNALIB_FN(BASE_IDX1 + 2, hal_usb, HAL_USB_Detach, void(void))
# define BASE_IDX2 (BASE_IDX1 + 3)
#else
# define BASE_IDX2 BASE_IDX1
#endif

#ifdef USB_VENDOR_REQUEST_ENABLE
DYNALIB_FN(BASE_IDX2 + 0, hal_usb, HAL_USB_Set_Vendor_Request_Callback, void(HAL_USB_Vendor_Request_Callback, void*))
# define BASE_IDX3 (BASE_IDX2 + 1)
#else
# define BASE_IDX3 BASE_IDX2
#endif

DYNALIB_END(hal_usb)

#undef BASE_IDX

#endif /* HAL_DYNALIB_USB_H */
37 changes: 28 additions & 9 deletions hal/inc/usb_config_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,36 @@
/* We are temporary defining this macro over here */
/* This could also be passed via -D option in build script */
#define SPARK_USB_SERIAL //Default is Virtual COM Port
//#define SPARK_USB_MOUSE
//#define SPARK_USB_KEYBOARD

#if !defined (SPARK_USB_SERIAL) && !defined (SPARK_USB_MOUSE) && !defined (SPARK_USB_KEYBOARD)
#define USB_CDC_ENABLE //Use USB Serial feature by default if none is defined
#elif defined (SPARK_USB_SERIAL)
#define USB_CDC_ENABLE //Enable USB CDC code
#elif defined (SPARK_USB_MOUSE) || defined (SPARK_USB_KEYBOARD)
#define USB_HID_ENABLE //Enable USB HID code

#if PLATFORM_ID >= 6
# define SPARK_USB_MOUSE
# define SPARK_USB_KEYBOARD

# if !defined (SPARK_USB_SERIAL) && !defined (SPARK_USB_MOUSE) && !defined (SPARK_USB_KEYBOARD)
# define USB_CDC_ENABLE //Use USB Serial feature by default if none is defined
# else
# if defined(SPARK_USB_SERIAL)
# define USB_CDC_ENABLE //Enable USB CDC code
# endif
# if defined (SPARK_USB_MOUSE) || defined (SPARK_USB_KEYBOARD)
# define USB_HID_ENABLE //Enable USB HID code
# endif
# endif

#else

# if !defined (SPARK_USB_SERIAL) && !defined (SPARK_USB_MOUSE) && !defined (SPARK_USB_KEYBOARD)
# define USB_CDC_ENABLE //Use USB Serial feature by default if none is defined
# elif defined (SPARK_USB_SERIAL)
# define USB_CDC_ENABLE //Enable USB CDC code
# elif defined (SPARK_USB_MOUSE) || defined (SPARK_USB_KEYBOARD)
# define USB_HID_ENABLE //Enable USB HID code
# endif
#endif

#if PLATFORM_ID == 6 || PLATFORM_ID == 8 || PLATFORM_ID == 10
# define USB_VENDOR_REQUEST_ENABLE
#endif // PLATFORM_ID == 6 || 8 || 10

#endif /* USB_CONFIG_HAL_H */

Loading