mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 05:53:39 +00:00
implemented USB HID composite keyboard support
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"device/arm"
|
||||
"device/nxp"
|
||||
"machine"
|
||||
"machine/usb"
|
||||
"math/bits"
|
||||
"unsafe"
|
||||
)
|
||||
@@ -125,12 +126,13 @@ func initUART() {
|
||||
}
|
||||
|
||||
func initUSB() {
|
||||
machine.UART0.Configure(machine.UARTConfig{})
|
||||
machine.HID0.Configure(usb.HIDConfig{})
|
||||
// machine.UART0.Configure(usb.UARTConfig{})
|
||||
}
|
||||
|
||||
func putchar(c byte) {
|
||||
machine.UART0.WriteByte(c) // print to USB UART
|
||||
// machine.UART1.WriteByte(c) // print to hardware UART
|
||||
// machine.UART0.WriteByte(c) // print to USB UART
|
||||
machine.UART1.WriteByte(c) // print to hardware UART
|
||||
}
|
||||
|
||||
func abort() {
|
||||
|
||||
Reference in New Issue
Block a user