aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/runtime/runtime_atsamd51.go
diff options
context:
space:
mode:
authorsago35 <[email protected]>2022-07-06 07:58:42 +0900
committerRon Evans <[email protected]>2022-07-06 17:55:25 +0200
commit2fa24ef752c6a5aacc96dd7f8e317e49cf0302f1 (patch)
treead30b5fe6ba66c7e2bd8e31ea4f521cf27e2b3c8 /src/runtime/runtime_atsamd51.go
parentfcefcb191cbce5e9d15f844581ddf6d28a7248a1 (diff)
downloadtinygo-2fa24ef752c6a5aacc96dd7f8e317e49cf0302f1.tar.gz
tinygo-2fa24ef752c6a5aacc96dd7f8e317e49cf0302f1.zip
samd21,samd51,nrf52840: refactor usb initialization
Diffstat (limited to 'src/runtime/runtime_atsamd51.go')
-rw-r--r--src/runtime/runtime_atsamd51.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/runtime/runtime_atsamd51.go b/src/runtime/runtime_atsamd51.go
index d45026245..cb29d9650 100644
--- a/src/runtime/runtime_atsamd51.go
+++ b/src/runtime/runtime_atsamd51.go
@@ -28,11 +28,8 @@ func init() {
initUSBClock()
initADCClock()
- // connect to USB CDC interface
+ machine.USBDev.Configure(machine.UARTConfig{})
machine.InitSerial()
- if !machine.USB.Configured() {
- machine.USB.Configure(machine.UARTConfig{})
- }
}
func putchar(c byte) {