mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
f52ecf3054
In some cases, regular integers were used. But we have a constant to explicitly say these pins are undefined: `NoPin`. So use this. A better solution would be to not require these constants, like with the proposal in https://github.com/tinygo-org/tinygo/issues/3152. This change is just a slight improvement over the current state.
42 lines
805 B
Go
42 lines
805 B
Go
//go:build mdbt50qrx
|
|
// +build mdbt50qrx
|
|
|
|
package machine
|
|
|
|
const HasLowFrequencyCrystal = false
|
|
|
|
// GPIO Pins
|
|
const (
|
|
D0 = P1_13 // LED1
|
|
D1 = P1_11 // LED2 (not populated by default)
|
|
D2 = P0_15 // Button
|
|
)
|
|
|
|
const (
|
|
LED = D0
|
|
)
|
|
|
|
// MDBT50Q-RX dongle does not have pins broken out for the peripherals below,
|
|
// however the machine_nrf*.go implementations of I2C/SPI/etc expect the pin
|
|
// constants to be defined, so we are defining them all as NoPin
|
|
const (
|
|
UART_TX_PIN = NoPin
|
|
UART_RX_PIN = NoPin
|
|
SDA_PIN = NoPin
|
|
SCL_PIN = NoPin
|
|
SPI0_SCK_PIN = NoPin
|
|
SPI0_SDO_PIN = NoPin
|
|
SPI0_SDI_PIN = NoPin
|
|
)
|
|
|
|
// USB CDC identifiers
|
|
const (
|
|
usb_STRING_PRODUCT = "Raytac MDBT50Q - RX"
|
|
usb_STRING_MANUFACTURER = "Raytac Corporation"
|
|
)
|
|
|
|
var (
|
|
usb_VID uint16 = 0x239A
|
|
usb_PID uint16 = 0x810B
|
|
)
|