mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
esp32s3-usbserial: move InitSerial to init method
This commit is contained in:
@@ -54,10 +54,6 @@ func main() {
|
||||
// Configure interrupt handler
|
||||
interruptInit()
|
||||
|
||||
// Initialize UART.
|
||||
machine.USBCDC.Configure(machine.UARTConfig{})
|
||||
machine.InitSerial()
|
||||
|
||||
// Initialize main system timer used for time.Now.
|
||||
initTimer()
|
||||
|
||||
@@ -68,6 +64,11 @@ func main() {
|
||||
exit(0)
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Initialize UART.
|
||||
machine.InitSerial()
|
||||
}
|
||||
|
||||
func abort() {
|
||||
// lock up forever
|
||||
for {
|
||||
|
||||
@@ -72,9 +72,6 @@ func main() {
|
||||
clearbss()
|
||||
}
|
||||
|
||||
// Initialize UART.
|
||||
machine.InitSerial()
|
||||
|
||||
// Initialize main system timer used for time.Now.
|
||||
initTimer()
|
||||
|
||||
@@ -85,6 +82,11 @@ func main() {
|
||||
exit(0)
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Initialize UART.
|
||||
machine.InitSerial()
|
||||
}
|
||||
|
||||
func abort() {
|
||||
// lock up forever
|
||||
print("abort called\n")
|
||||
|
||||
Reference in New Issue
Block a user