implemented USB HID composite keyboard support

This commit is contained in:
ardnew
2021-05-02 18:05:36 -05:00
parent 43d5eee1e6
commit e9ddbdf4a8
16 changed files with 3461 additions and 498 deletions
+5 -3
View File
@@ -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() {