Closed forderud closed 3 months ago
Alternative to #33 for battery emulation.
BATTERY\0
BATTERY_INFORMATION
BATTERY_STATUS
USB pipe: Use IN interrupt endpoint (max 64byte package size, max 255ms polling interval)
IN interrupt
Teensy dev setup: https://www.pjrc.com/teensy/td_download.html
Implement the protocol above and transmit battery charge changes periodically.
Open questions:
Class=Battery - can most likely be combined with USB client driver
Class=Battery
Notes:
WdfUsbTargetPipeReadSynchronously
IOCTL_BATTERY_QUERY_INFORMATION
IOCTL_BATTERY_QUERY_STATUS
simbatt
Closed in favor of #33
Alternative to #33 for battery emulation.
Idea
USB protocol
BATTERY\0
(8bytes),BATTERY_INFORMATION
struct (36bytes) and aBATTERY_STATUS
struct (16bytes) to host,BATTERY_STATUS
structs (16bytes) on-demand to host when the status changes.USB pipe: Use
IN interrupt
endpoint (max 64byte package size, max 255ms polling interval)Teensy firmware
Teensy dev setup: https://www.pjrc.com/teensy/td_download.html
Implement the protocol above and transmit battery charge changes periodically.
Open questions:
Battery driver
Class=Battery
- can most likely be combined with USB client driverNotes:
WdfUsbTargetPipeReadSynchronously
for blocking read from interrupt endpoint during initializationImplementation stages
IOCTL_BATTERY_QUERY_INFORMATION
andIOCTL_BATTERY_QUERY_STATUS
to user-space.simbatt
sampleLinks