/** * Device Discovery Tools * Device detection and listing tools. * * Provides: * - listDevices: Discovers connected serial adapters. * - findDeviceByPort: Resolves device by path. * - getFirstDevice: Resolves default device. * - hasConnectedDevices: Checks for existing endpoints. * - findDevicesByDescription: Queries devices by hardware description. * - findDevicesByHardwareId: Queries devices by internal identifier. * - findDeviceByHwid: Resolves a single device by exact hardware ID. */ import type { SerialDevice } from "../types.js"; /** * Lists all connected serial devices. * * @returns Array object denoting active and accessible COM interfaces. */ export declare function listDevices(): Promise; /** * Finds a device by port path. * * @param port - Path or designation of the serial port to find. * @returns Connected device descriptor or null if disconnected. */ export declare function findDeviceByPort(port: string): Promise; /** * Gets the first available valid serial device (useful for auto-detection). * Prioritizes actual physical USB modems over noisy Mac Bluetooth stacks. * * @returns Initially indexed verified device entry or null if none exist. */ export declare function getFirstDevice(): Promise; /** * Checks if any devices are connected. * * @returns True if at least one serial device was discovered. */ export declare function hasConnectedDevices(): Promise; /** * Lists devices filtered by description (useful for finding specific board types). * * @param searchTerm - Keyword criteria to filter equipment details. * @returns Array collection of matched serial endpoints. */ export declare function findDevicesByDescription(searchTerm: string): Promise; /** * Lists devices filtered by hardware ID. * * @param searchTerm - Identifier or string footprint present in HWID. * @returns Filtered subsets of devices bound by hardware signatures. */ export declare function findDevicesByHardwareId(searchTerm: string): Promise; /** * Finds a specific device by its exact hardware ID. * * @param hwid - The hardware ID to match. * @returns The matched device or null. */ export declare function findDeviceByHwid(hwid: string): Promise; /** * Actively polls the system bus for a device matching a specific hardware ID to reappear. * Essential for macOS where ESP32-S3 boards physically drop off the bus and re-enumerate * with incremented port suffixes after a firmware flash. * * @param hwid - The exact hardware identifier (e.g., '303A:1001') to poll for. * @param timeoutMs - Maximum duration in milliseconds to wait before giving up. * @returns The newly assigned physical port path (e.g., '/dev/cu.usbmodem102') or null on timeout. */ export declare function waitForDeviceByHwid(hwid: string, timeoutMs?: number, logCallback?: (msg: string) => void): Promise; //# sourceMappingURL=devices.d.ts.map