Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 9980aa6

Browse files
committed
add a usb flag for the VID and PID of boards.
1 parent 42b6d64 commit 9980aa6

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ menu.debug=Debug
2525

2626
# Seeed Arch Mix
2727
# ------------------------------
28-
seeed_arch_mix.name=Seeed Arch Mix
28+
seeed_arch_mix.name=Seeeduino Arch Mix
2929
seeed_arch_mix.vid.0=0x2886
3030
seeed_arch_mix.pid.0=0x002B
3131
seeed_arch_mix.vid.1=0x2886

cores/arduino/USB/usb_device_descriptor.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
* SPDX-License-Identifier: BSD-3-Clause
77
*/
8+
#include "Arduino.h"
89
#include "usb_device_config.h"
910
#include "usb.h"
1011
#include "usb_device.h"
@@ -89,9 +90,9 @@ uint8_t g_UsbDeviceDescriptor[] = {
8990
/* Maximum packet size for endpoint zero (only 8, 16, 32, or 64 are valid) */
9091
USB_CONTROL_MAX_PACKET_SIZE,
9192
/* Vendor ID (assigned by the USB-IF) */
92-
0x86U, 0x28U,
93+
USB_VID&0xFF, USB_VID>>8,
9394
/* Product ID (assigned by the manufacturer) */
94-
0x2BU, 0x80U,
95+
USB_PID&0xFF, USB_PID>>8,
9596
/* Device release number in binary-coded decimal */
9697
USB_SHORT_GET_LOW(USB_DEVICE_DEMO_BCD_VERSION), USB_SHORT_GET_HIGH(USB_DEVICE_DEMO_BCD_VERSION),
9798
/* Index of string descriptor describing manufacturer */

platform.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ compiler.arm.cmsis.ldflags="-L{runtime.platform.path}/tools/sdk/CMSIS/Lib/GCC/"
9393

9494
compiler.sdk.ldflags=-Wl,--whole-archive "{runtime.platform.path}/tools/lib/{build.processor}/libfsl_usb_drivers.a" "{runtime.platform.path}/tools/lib/{build.processor}/libfsl_bsp.a" -Wl,--no-whole-archive
9595

96+
9697
# Compile patterns
9798
# ----------------
9899

@@ -103,7 +104,7 @@ recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU=
103104
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.debug} {compiler.arm.cmsis.c.flags} {compiler.preproc.include} {includes} "{source_file}" -o "{object_file}"
104105

105106
## Compile S files
106-
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
107+
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
107108

108109
## Create archives
109110
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

variants/arch_mix/variant.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
#include "fsl_common.h"
3232
#include "fsl_gpio.h"
3333

34+
#define USB_VID 0x2886
35+
#define USB_PID 0x802B
36+
3437
#ifdef __cplusplus
3538
extern "C"
3639
{

0 commit comments

Comments
 (0)