mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
Added support for dynamic USB_VID / USB_PID.
It can be changed on runtime without rebuilding or patching. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#endif
|
||||
#include "pico_keys_version.h"
|
||||
#include "usb.h"
|
||||
#include "pico_keys.h"
|
||||
|
||||
#ifndef USB_VID
|
||||
#define USB_VID 0xFEFF
|
||||
@@ -39,11 +40,14 @@
|
||||
|
||||
#define MAX_USB_POWER 1
|
||||
|
||||
uint16_t usb_vid = USB_VID;
|
||||
uint16_t usb_pid = USB_PID;
|
||||
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Device Descriptors
|
||||
//--------------------------------------------------------------------+
|
||||
tusb_desc_device_t const desc_device = {
|
||||
tusb_desc_device_t desc_device = {
|
||||
.bLength = sizeof(tusb_desc_device_t),
|
||||
.bDescriptorType = TUSB_DESC_DEVICE,
|
||||
.bcdUSB = (USB_BCD),
|
||||
|
||||
Reference in New Issue
Block a user