feat: expose dongle debug info through the C API
Add an opaque xone_dongle session handle to the C ABI bridge: xone_open() probes, resets, and loads the firmware (path optional), and xone_pid/xone_chip_id/xone_mac_address/xone_firmware_build return debug info for the open session. chip captures the firmware build string from the image header during load. The Swift app opens a session when the dongle appears and shows PID, chip ID, MAC address, and firmware build string in a debug section. Co-Authored-By: qwen3.8-27b@q2_k_xl: added C API session handle and debug UI
This commit is contained in:
@@ -45,6 +45,9 @@ public:
|
||||
// Resets the MCU if firmware is already loaded. Returns 0 or -errno.
|
||||
auto load_firmware(char const *path) -> int;
|
||||
|
||||
// Build string of the loaded firmware image (empty until load_firmware).
|
||||
auto firmware_build() const -> char const *;
|
||||
|
||||
private:
|
||||
// Send an MCU command (port of xone_mt76_send_command). `cmd` is the
|
||||
// MT_MCU_MSG_CMD_TYPE field. Returns bytes written, or a negative errno.
|
||||
@@ -59,6 +62,7 @@ private:
|
||||
auto reset_firmware() -> int;
|
||||
|
||||
usb::transport &transport_;
|
||||
char build_time_[17] = {};
|
||||
};
|
||||
|
||||
} // namespace xone::mt76
|
||||
|
||||
Reference in New Issue
Block a user