candleLight, CANable, CANnectivity and cantact adapters speak gs_usb. On Linux and macOS the kernel driver exposes them as SocketCAN interfaces, so SavvyCAN already reached them through Qt SerialBus. Windows has no such driver, which left those adapters unusable there. Add a GSUSBConnection that talks to the hardware directly over WinUSB: - one connection per physical device, one SavvyCAN bus per CAN channel - CAN FD including BRS, plus RTR, extended IDs and error frames - known good bit timings for 16/48/80/160/170 MHz device clocks, with a generic solver for clocks the tables do not cover - hardware timestamps, unwrapped across the 32 bit rollover and anchored to the host clock so they line up with the rest of SavvyCAN gs_usb multiplexes every channel over a single USB bulk IN endpoint, so a single reader thread drains it and hands frames to the connection thread in batches, coalescing the wakeups. That keeps one producer on the lock free queue, which the tx echo path already writes to. Device scans skip adapters that a live connection holds. candle_dev_open() shares the file handle and queues read URBs immediately, so probing a device in use would consume frames the open connection is waiting for. connections/candle_api is an unmodified copy of the candle Windows API, LGPL 3.0 rather than MIT and only compiled into Windows builds. See its README for provenance. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XZnuZJ7zc3e8hk6C8bGDZN
1.1 KiB
1.1 KiB
candle API (gs_usb / candleLight Windows driver)
Vendored, unmodified copy of the candle Windows API used by SavvyCAN's gs_usb
connection (connections/gs_usb.cpp). It talks to gs_usb class devices
(candleLight, CANable, CANnectivity, cantact, ...) over WinUSB, so no vendor
driver is needed — only a WinUSB binding on the device interface (which the
stock candleLight/CANable firmware already declares via WCID descriptors).
Provenance
- Original: https://github.com/HubertD/candle_dll — Copyright (c) 2016 Hubert Denkmair
- This copy: https://github.com/Schildkroet/CANgaroo,
src/driver/CandleApiDriver/api/at commited3088d5393e02a01afe867af2ee8ab0e12db039, which adds CAN FD, multi-channel and hardware timestamp support — Copyright (c) 2026 Schildkroet
License
These files are LGPL-3.0, not MIT like the rest of SavvyCAN. They are only
compiled into Windows builds. Keep LICENSE alongside them, and keep the files
separable so the LGPL relinking provision can be satisfied. Do not copy code out
of this directory into the MIT-licensed parts of the tree.