aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/machine/board_tufty2040.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-03-30 13:24:55 +0100
committerRon Evans <[email protected]>2024-04-04 19:34:01 +0200
commitc55ac9f28ecef310931318f197fbd7f8606875e9 (patch)
tree92019758ec6842f268c32497e767621f74c60b55 /src/machine/board_tufty2040.go
parent2733e376bdca4af9e47e90d6c27acbfd3b3e3636 (diff)
downloadtinygo-c55ac9f28ecef310931318f197fbd7f8606875e9.tar.gz
tinygo-c55ac9f28ecef310931318f197fbd7f8606875e9.zip
rp2040: move UART0 and UART1 to common file
This is makes it easier to use these in simulation, plus it avoids duplication. The only downside I see is that more UARTs get defined than a board supports, but no existing code should break (no UARTs get renamed for example).
Diffstat (limited to 'src/machine/board_tufty2040.go')
-rw-r--r--src/machine/board_tufty2040.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/machine/board_tufty2040.go b/src/machine/board_tufty2040.go
index d82cb9951..57d244f28 100644
--- a/src/machine/board_tufty2040.go
+++ b/src/machine/board_tufty2040.go
@@ -7,11 +7,6 @@
// - Tufty 2040 schematic: https://cdn.shopify.com/s/files/1/0174/1800/files/tufty_schematic.pdf?v=1655385675
package machine
-import (
- "device/rp"
- "runtime/interrupt"
-)
-
const (
LED Pin = GPIO25
@@ -87,17 +82,4 @@ const (
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)
-}