24 lines
568 B
TypeScript
24 lines
568 B
TypeScript
export enum ViewMode {
|
|
ASCII = 'ASCII',
|
|
HEX = 'HEX'
|
|
}
|
|
|
|
export interface SerialLogEntry {
|
|
id: string;
|
|
timestamp: Date;
|
|
direction: 'TX' | 'RX';
|
|
data: Uint8Array;
|
|
}
|
|
|
|
// Minimal Web Serial API type definitions since they aren't in all TS configs yet
|
|
export interface SerialPort {
|
|
open(options: { baudRate: number }): Promise<void>;
|
|
close(): Promise<void>;
|
|
readable: ReadableStream<Uint8Array> | null;
|
|
writable: WritableStream<Uint8Array> | null;
|
|
}
|
|
|
|
export interface NavigatorSerial {
|
|
requestPort(options?: { filters: any[] }): Promise<SerialPort>;
|
|
}
|