mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
refactor USB package with device class build tags
added basic HID keyboard support for SAMx51 (not fully-functional)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
//go:build baremetal && usb.hid
|
||||
// +build baremetal,usb.hid
|
||||
|
||||
package machine
|
||||
|
||||
import "machine/usb"
|
||||
|
||||
var USB = &usb.HID{Port: 0}
|
||||
|
||||
func init() {
|
||||
// Configure USB D+/D- pins.
|
||||
USBCDC_DM_PIN.Configure(PinConfig{Mode: PinCom})
|
||||
USBCDC_DP_PIN.Configure(PinConfig{Mode: PinCom})
|
||||
}
|
||||
Reference in New Issue
Block a user