-
Notifications
You must be signed in to change notification settings - Fork 1.7k
MEMO
hasu@tmk edited this page Nov 18, 2021
·
28 revisions
https://arduino.stackexchange.com/a/12588
Arduino Timer:
unsigned long millis()
unsigned long micros()
unsigned long
is 32-bit size on AVR. millis()
rollovers in 49.7 days and micros()
in 71.58 secs.
https://gcc.gnu.org/wiki/avr-gcc#Type_Layout
https://www.nongnu.org/avr-libc/user-manual/group__avr__stdint.html
for non-keyboard project
- NO_KEYBOARD build option for minimal build
- 6KRO_ENABLE(boot keyboard compatible when report protocol)
- NKRO_ENABLE
currently keyboard function is built automatically without any options.
two implementatons exists on PS/2 and ADB. One common impl to be shared by projects would be nice.
Data on recv buffer can be removed by calling host_send(). TODO: Fix
need to be organized
MOUSE_ENABLE is needed for mouse project without mouse key feature. It enables mouse output interface.
Send command to the endpoint for hidden functions.
- UHS_HID(UHS_USB_HOST_BASE *p, UHS_HID_PROCESSOR *hp)
- Start()
- OKtoEnumerate(ENUMERATION_INFO *ei)
- SetInterface(ENUMERATION_INFO *ei)
- Poll()
- DriverDefaults()
- driverPoll()
- GetAddress()
- Polling()
- OnRelease()
- SetIdle(iface, reportID, duration)
- SetProtocol(iface, protocol)
- SetReport(iface, report_type, report_id, nbytes, dataptr)
- ReportDescr(wIndex, nbytes, *buffer)
- onStart(UHS_HID_base)
- onPoll(UHS_HID_base, data, length)
- onRelease(UHS_HID_base)
HID drivers: RAW, KEYBOARD, MOUSE
- UHS_HID *parent
- UHS_HID_driver_t driver
- driverPoll()
- driverStart()
- driverRelease()
- writeReport(nbytes, *dataptr)