boards: add Challenger RP2040 LoRa

This commit is contained in:
Kenneth Bell
2022-07-01 17:06:08 +01:00
committed by Ron Evans
parent e1405640da
commit 1d99b1ed84
12 changed files with 348 additions and 34 deletions
+28
View File
@@ -3,6 +3,11 @@
package machine
import (
"device/rp"
"runtime/interrupt"
)
const (
LED = GPIO25
@@ -80,6 +85,29 @@ const (
SPI1_SDI_PIN = GPIO12 // Rx
)
// UART pins
const (
UART0_TX_PIN = GPIO0
UART0_RX_PIN = GPIO1
UART_TX_PIN = UART0_TX_PIN
UART_RX_PIN = UART0_RX_PIN
)
// UART on the RP2040
var (
UART0 = &_UART0
_UART0 = UART{
Buffer: NewRingBuffer(),
Bus: rp.UART0,
}
)
var DefaultUART = UART0
func init() {
UART0.Interrupt = interrupt.New(rp.IRQ_UART0_IRQ, _UART0.handleInterrupt)
}
// USB identifiers
const (
usb_STRING_PRODUCT = "Thing Plus RP2040"