Skip to content

Commit

Permalink
machine/nrf52840: use correct USB device descriptor and string descri…
Browse files Browse the repository at this point in the history
…ptor for nrf52840 based boards

Signed-off-by: Ron Evans <[email protected]>
  • Loading branch information
deadprogram authored and aykevl committed Mar 18, 2020
1 parent 9f597bb commit a02d4e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/machine/usb_nrf52840.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ func sendDescriptor(setup usbSetup) {
sendUSBPacket(0, dd.Bytes()[:8])
} else {
// complete descriptor requested so send entire packet
dd := NewDeviceDescriptor(0x00, 0x00, 0x00, 64, usb_VID, usb_PID, 0x100, usb_IMANUFACTURER, usb_IPRODUCT, usb_ISERIAL, 1)
dd := NewDeviceDescriptor(0x02, 0x00, 0x00, 64, usb_VID, usb_PID, 0x100, usb_IMANUFACTURER, usb_IPRODUCT, usb_ISERIAL, 1)
sendUSBPacket(0, dd.Bytes())
}
return
Expand All @@ -422,10 +422,10 @@ func sendDescriptor(setup usbSetup) {
switch setup.wValueL {
case 0:
b := make([]byte, 4)
b[0] = byte(usb_STRING_LANGUAGE[0] >> 8)
b[1] = byte(usb_STRING_LANGUAGE[0] & 0xff)
b[2] = byte(usb_STRING_LANGUAGE[1] >> 8)
b[3] = byte(usb_STRING_LANGUAGE[1] & 0xff)
b[0] = 0x04
b[1] = 0x03
b[2] = 0x09
b[3] = 0x04
sendUSBPacket(0, b)

case usb_IPRODUCT:
Expand Down

0 comments on commit a02d4e0

Please sign in to comment.