/** * Cross-platform USB device discovery for CrossPad. * * Primary method: Python/pyserial (required for IDF builds anyway). * Fallback: platform-specific commands (Linux sysfs, macOS system_profiler, Windows PowerShell). * * Supports multiple simultaneous CrossPad devices — each identified by port path. */ export type CrosspadKind = "esp-native" | "stm-bridge"; /** Returns the CrossPad generation for a USB VID/PID, or null if not a CrossPad. */ export declare function classifyCrosspad(vid: number, pid: number): CrosspadKind | null; export interface CrosspadDevice { port: string; vid: number; pid: number; serial_number: string | null; description: string; manufacturer: string | null; is_crosspad: boolean; /** Which CrossPad generation this is (null when not a CrossPad). */ kind: CrosspadKind | null; } export interface DeviceListResult { success: boolean; devices: CrosspadDevice[]; all_ports: CrosspadDevice[]; error?: string; } /** * List all connected USB serial devices. Returns CrossPad devices separately. * Tries Python/pyserial first, falls back to platform-specific methods. */ export declare function listDevices(): DeviceListResult; /** * Find a CrossPad device, optionally by port. * If port is specified, validates it's a CrossPad device. * If not specified, auto-detects (fails if 0 or >1 found). */ export declare function findCrosspadPort(port?: string): { port: string; device?: CrosspadDevice; error?: string; };