mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
rp2040: make all RP2040 boards available for simulation
This makes all rp2040 boards available for simulation using -tags=<board_name>. Importantly, this includes the Gopher Badge which I'm working on to add to the TinyGo Playground.
This commit is contained in:
committed by
Ron Evans
parent
c55ac9f28e
commit
90b0bf646c
@@ -7,15 +7,14 @@ package machine
|
||||
const deviceName = "generic"
|
||||
|
||||
var (
|
||||
UART0 = &UART{0}
|
||||
USB = &UART{100}
|
||||
USB = &UART{100}
|
||||
)
|
||||
|
||||
// The Serial port always points to the default UART in a simulated environment.
|
||||
//
|
||||
// TODO: perhaps this should be a special serial object that outputs via WASI
|
||||
// stdout calls.
|
||||
var Serial = UART0
|
||||
var Serial = hardwareUART0
|
||||
|
||||
const (
|
||||
PinInput PinMode = iota
|
||||
@@ -176,6 +175,11 @@ func uartRead(bus uint8, buf *byte, bufLen int) int
|
||||
//export __tinygo_uart_write
|
||||
func uartWrite(bus uint8, buf *byte, bufLen int) int
|
||||
|
||||
var (
|
||||
hardwareUART0 = &UART{0}
|
||||
hardwareUART1 = &UART{1}
|
||||
)
|
||||
|
||||
// Some objects used by Atmel SAM D chips (samd21, samd51).
|
||||
// Defined here (without build tag) for convenience.
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user