mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 22:43:40 +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.cdc
|
||||
// +build baremetal,usb.cdc
|
||||
|
||||
package machine
|
||||
|
||||
import "machine/usb"
|
||||
|
||||
var USB = &usb.CDC{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