forked from espressif/arduino-esp32
Add support for custom VID/PID and Board name to show in ArduinoIDE ports list
This commit is contained in:
@ -14,6 +14,8 @@ menu.Revision=Board Revision
|
|||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
esp32s2.name=ESP32S2 Dev Module
|
esp32s2.name=ESP32S2 Dev Module
|
||||||
|
esp32s2.vid.0=0x303a
|
||||||
|
esp32s2.pid.0=0x0002
|
||||||
|
|
||||||
esp32s2.upload.tool=esptool_py
|
esp32s2.upload.tool=esptool_py
|
||||||
esp32s2.upload.maximum_size=1310720
|
esp32s2.upload.maximum_size=1310720
|
||||||
|
@ -17,6 +17,22 @@
|
|||||||
#if CONFIG_USB_ENABLED
|
#if CONFIG_USB_ENABLED
|
||||||
#include "usb_persist.h"
|
#include "usb_persist.h"
|
||||||
|
|
||||||
|
#ifndef USB_VID
|
||||||
|
#define USB_VID USB_ESPRESSIF_VID
|
||||||
|
#endif
|
||||||
|
#ifndef USB_PID
|
||||||
|
#define USB_PID 0x0002
|
||||||
|
#endif
|
||||||
|
#ifndef USB_MANUFACTURER
|
||||||
|
#define USB_MANUFACTURER "Espressif Systems"
|
||||||
|
#endif
|
||||||
|
#ifndef USB_PRODUCT
|
||||||
|
#define USB_PRODUCT ARDUINO_BOARD
|
||||||
|
#endif
|
||||||
|
#ifndef USB_SERIAL
|
||||||
|
#define USB_SERIAL ""
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "tinyusb.h"
|
#include "tinyusb.h"
|
||||||
}
|
}
|
||||||
@ -97,11 +113,11 @@ void tud_resume_cb(void){
|
|||||||
}
|
}
|
||||||
|
|
||||||
ESPUSB::ESPUSB(size_t task_stack_size, uint8_t event_task_priority)
|
ESPUSB::ESPUSB(size_t task_stack_size, uint8_t event_task_priority)
|
||||||
:vid(USB_ESPRESSIF_VID)
|
:vid(USB_VID)
|
||||||
,pid(0x0002)
|
,pid(USB_PID)
|
||||||
,product_name(ARDUINO_BOARD)
|
,product_name(USB_PRODUCT)
|
||||||
,manufacturer_name("Espressif Systems")
|
,manufacturer_name(USB_MANUFACTURER)
|
||||||
,serial_number("")
|
,serial_number(USB_SERIAL)
|
||||||
,fw_version(0x0100)
|
,fw_version(0x0100)
|
||||||
,usb_version(0x0200)// at least 2.1 or 3.x for BOS & webUSB
|
,usb_version(0x0200)// at least 2.1 or 3.x for BOS & webUSB
|
||||||
,usb_class(TUSB_CLASS_MISC)
|
,usb_class(TUSB_CLASS_MISC)
|
||||||
|
Reference in New Issue
Block a user