aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/machine/board_metro-m4-airlift.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-06-01 13:27:58 +0200
committerRon Evans <[email protected]>2021-06-25 17:58:39 +0200
commit96e863f0f37cef0e8f36cb0d5f1c94fe062bc03d (patch)
treef4044fca721e0d1f58f64e7a312b6fb92215f64f /src/machine/board_metro-m4-airlift.go
parent75298bb84bcb966998ca00f3cc5506a9757a5038 (diff)
downloadtinygo-96e863f0f37cef0e8f36cb0d5f1c94fe062bc03d.tar.gz
tinygo-96e863f0f37cef0e8f36cb0d5f1c94fe062bc03d.zip
all: add a flag to the command line to select the serial implementation
This can be very useful for some purposes: * It makes it possible to disable the UART in cases where it is not needed or needs to be disabled to conserve power. * It makes it possible to disable the serial output to reduce code size, which may be important for some chips. Sometimes, a few kB can be saved this way. * It makes it possible to override the default, for example you might want to use an actual UART to debug the USB-CDC implementation. It also lowers the dependency on having machine.Serial defined, which is often not defined when targeting a chip. Eventually, we might want to make it possible to write `-target=nrf52` or `-target=atmega328p` for example to target the chip itself with no board specific assumptions. The defaults don't change. I checked this by running `make smoketest` before and after and comparing the results.
Diffstat (limited to 'src/machine/board_metro-m4-airlift.go')
-rw-r--r--src/machine/board_metro-m4-airlift.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/machine/board_metro-m4-airlift.go b/src/machine/board_metro-m4-airlift.go
index 276defa92..4aa248150 100644
--- a/src/machine/board_metro-m4-airlift.go
+++ b/src/machine/board_metro-m4-airlift.go
@@ -41,8 +41,6 @@ const (
WS2812 = D40
)
-var Serial = USB
-
// USBCDC pins
const (
USBCDC_DM_PIN = PA24