import { EventInterface } from 'microevent.ts'; import BusInterface from '../bus/BusInterface'; import CpuInterface from '../cpu/CpuInterface'; import TimerInterface from './TimerInterface'; interface BoardInterface { getBus(): BusInterface; getCpu(): CpuInterface; getTimer(): TimerInterface; reset(hard: boolean): BoardInterface; boot(): BoardInterface; suspend(): void; resume(): void; getClockMode(): BoardInterface.ClockMode; setClockMode(clockMode: BoardInterface.ClockMode): BoardInterface; triggerTrap(reason: BoardInterface.TrapReason, message?: string): BoardInterface; getBoardStateDebug(): string; trap: EventInterface; cpuClock: EventInterface; clock: EventInterface; systemReset: EventInterface; } declare namespace BoardInterface { const enum TrapReason { cpu = 0, bus = 1, debug = 2, board = 3 } const enum ClockMode { instruction = 0, lazy = 1 } class TrapPayload { reason: TrapReason; board: BoardInterface; message?: string; constructor(reason: TrapReason, board: BoardInterface, message?: string); } } export { BoardInterface as default };