Browse Source

machine/usb: set the vid and pid to valid values supplied by Adafruit and Arduino for boards that support USB CDC

Signed-off-by: Ron Evans <ron@hybridgroup.com>
pull/966/head
Ron Evans 5 years ago
committed by Ayke
parent
commit
0312f12696
  1. 11
      src/machine/board_arduino_nano33.go
  2. 11
      src/machine/board_circuitplay_express.go
  3. 11
      src/machine/board_feather-m0.go
  4. 11
      src/machine/board_feather-m4.go
  5. 11
      src/machine/board_itsybitsy-m0.go
  6. 11
      src/machine/board_itsybitsy-m4.go
  7. 11
      src/machine/board_metro-m4-airlift.go
  8. 11
      src/machine/board_pybadge.go
  9. 11
      src/machine/board_pyportal.go
  10. 11
      src/machine/board_trinket.go
  11. 7
      src/machine/usb.go

11
src/machine/board_arduino_nano33.go

@ -90,3 +90,14 @@ const (
I2S_SD_PIN Pin = PA08
I2S_WS_PIN = NoPin // TODO: figure out what this is on Arduino Nano 33.
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Arduino NANO 33 IoT"
usb_STRING_MANUFACTURER = "Arduino"
)
var (
usb_VID uint16 = 0x2341
usb_PID uint16 = 0x8057
)

11
src/machine/board_circuitplay_express.go

@ -88,3 +88,14 @@ const (
I2S_SD_PIN = PA08
I2S_WS_PIN = NoPin // no WS, instead uses SCK to sync
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Circuit Playground Express"
usb_STRING_MANUFACTURER = "Adafruit"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x8018
)

11
src/machine/board_feather-m0.go

@ -102,3 +102,14 @@ const (
I2S_SD_PIN = PA08
I2S_WS_PIN = NoPin // TODO: figure out what this is on Feather M0.
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Feather M0 Express"
usb_STRING_MANUFACTURER = "Adafruit"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x801B
)

11
src/machine/board_feather-m4.go

@ -87,3 +87,14 @@ var (
SERCOM: 1,
}
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Adafruit Feather M4"
usb_STRING_MANUFACTURER = "Adafruit LLC"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x8022
)

11
src/machine/board_itsybitsy-m0.go

@ -123,3 +123,14 @@ const (
var (
I2S0 = I2S{Bus: sam.I2S}
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "ItsyBitsy M0 Express"
usb_STRING_MANUFACTURER = "Adafruit"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x800F
)

11
src/machine/board_itsybitsy-m4.go

@ -89,3 +89,14 @@ var (
SERCOM: 1,
}
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Adafruit ItsyBitsy M4"
usb_STRING_MANUFACTURER = "Adafruit LLC"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x802B
)

11
src/machine/board_metro-m4-airlift.go

@ -116,3 +116,14 @@ var (
SERCOM: 1,
}
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Adafruit Metro M4 Airlift Lite"
usb_STRING_MANUFACTURER = "Adafruit LLC"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x8037
)

11
src/machine/board_pybadge.go

@ -133,3 +133,14 @@ var (
SERCOM: 4,
}
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Adafruit pyBadge M4"
usb_STRING_MANUFACTURER = "Adafruit LLC"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x8033
)

11
src/machine/board_pyportal.go

@ -143,3 +143,14 @@ var (
}
NINA_SPI = SPI0
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Adafruit PyPortal M4"
usb_STRING_MANUFACTURER = "Adafruit LLC"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x8035
)

11
src/machine/board_trinket.go

@ -93,3 +93,14 @@ const (
I2S_SD_PIN = PA08
I2S_WS_PIN = NoPin // TODO: figure out what this is on Trinket M0.
)
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Trinket M0"
usb_STRING_MANUFACTURER = "Adafruit"
)
var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x801E
)

7
src/machine/usb.go

@ -395,12 +395,7 @@ func strToUTF16LEDescriptor(in string) []byte {
var (
// TODO: allow setting these
usb_STRING_LANGUAGE = [2]uint16{(3 << 8) | (2 + 2), 0x0409} // English
usb_STRING_PRODUCT = "Arduino Zero"
usb_STRING_MANUFACTURER = "Arduino"
usb_VID uint16 = 0x2341
usb_PID uint16 = 0x004d
usb_STRING_LANGUAGE = [2]uint16{(3 << 8) | (2 + 2), 0x0409} // English
)
const (

Loading…
Cancel
Save