/** * (c) 2021, Micro:bit Educational Foundation and contributors * * SPDX-License-Identifier: MIT */ import { BoardSerialInfo } from "./board-serial-info.js"; import { Logging } from "../logging.js"; import { ArmDebugSwd } from "./arm-debug.js"; import { CortexM } from "./cortex-m.js"; import { DapLinkSerial } from "./daplink.js"; export interface BoardConnectionInfo { boardSerialInfo: BoardSerialInfo; deviceId: number; pageSize: number; numPages: number; } export declare class USBDeviceWrapper { readonly usbDevice: USBDevice; private logging; adi: ArmDebugSwd; cortexM: CortexM; serial: DapLinkSerial; private initialConnectionComplete; constructor(usbDevice: USBDevice, logging: Logging); reconnect(): Promise; /** * Read the board serial info, preferring the DAPLink vendor command. * Chrome may anonymize USBDevice.serialNumber for anti-fingerprinting * (https://github.com/microbit-foundation/microbit-connection/issues/57) * so we read it via the DAP protocol instead. */ private readBoardSerialInfo; disconnect(): Promise; }