aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/runtime_atsamd21.go2
-rw-r--r--src/runtime/runtime_atsamd51.go2
-rw-r--r--src/runtime/runtime_nrf52840.go2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/runtime_atsamd21.go b/src/runtime/runtime_atsamd21.go
index df0e8a493..0f411366b 100644
--- a/src/runtime/runtime_atsamd21.go
+++ b/src/runtime/runtime_atsamd21.go
@@ -7,6 +7,7 @@ import (
"device/arm"
"device/sam"
"machine"
+ "machine/usb/cdc"
"runtime/interrupt"
"runtime/volatile"
"unsafe"
@@ -28,6 +29,7 @@ func init() {
initUSBClock()
initADCClock()
+ cdc.EnableUSBCDC()
machine.USBDev.Configure(machine.UARTConfig{})
machine.InitSerial()
}
diff --git a/src/runtime/runtime_atsamd51.go b/src/runtime/runtime_atsamd51.go
index cb29d9650..f1e585ee2 100644
--- a/src/runtime/runtime_atsamd51.go
+++ b/src/runtime/runtime_atsamd51.go
@@ -7,6 +7,7 @@ import (
"device/arm"
"device/sam"
"machine"
+ "machine/usb/cdc"
"runtime/interrupt"
"runtime/volatile"
)
@@ -28,6 +29,7 @@ func init() {
initUSBClock()
initADCClock()
+ cdc.EnableUSBCDC()
machine.USBDev.Configure(machine.UARTConfig{})
machine.InitSerial()
}
diff --git a/src/runtime/runtime_nrf52840.go b/src/runtime/runtime_nrf52840.go
index a4907b925..cd1d892e5 100644
--- a/src/runtime/runtime_nrf52840.go
+++ b/src/runtime/runtime_nrf52840.go
@@ -7,6 +7,7 @@ import (
"device/arm"
"device/nrf"
"machine"
+ "machine/usb/cdc"
"runtime/interrupt"
"runtime/volatile"
)
@@ -28,6 +29,7 @@ func main() {
}
func init() {
+ cdc.EnableUSBCDC()
machine.USBDev.Configure(machine.UARTConfig{})
machine.InitSerial()
initLFCLK()