add usb setID()
This commit is contained in:
3 files changed
+8
-3
No files matched your search
+2
-1
@@ -76,7 +76,8 @@ int main( void )
|
||||
|
||||
#ifdef NRF52840_XXAA
|
||||
USBDevice.addInterface( (Adafruit_USBD_Interface&) Serial);
|
||||
USBDevice.begin(USB_VID, USB_PID);
|
||||
USBDevice.setID(USB_VID, USB_PID);
|
||||
USBDevice.begin();
|
||||
usb_init();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -173,11 +173,14 @@ bool Adafruit_USBD_Device::addInterface(Adafruit_USBD_Interface& itf)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Adafruit_USBD_Device::begin(uint16_t vid, uint16_t pid)
|
||||
void Adafruit_USBD_Device::setID(uint16_t vid, uint16_t pid)
|
||||
{
|
||||
_desc_device.idVendor = vid;
|
||||
_desc_device.idProduct = pid;
|
||||
}
|
||||
|
||||
bool Adafruit_USBD_Device::begin(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ class Adafruit_USBD_Device
|
||||
|
||||
bool addInterface(Adafruit_USBD_Interface& itf);
|
||||
|
||||
bool begin(uint16_t vid, uint16_t pid);
|
||||
void setID(uint16_t vid, uint16_t pid);
|
||||
bool begin(void);
|
||||
|
||||
bool mounted(void) { return tud_mounted(); }
|
||||
bool suspended(void) { return tud_suspended(); }
|
||||
|
||||
Reference in new issue
Block a user