Skip to content

hal

FlintOS Hardware Abstraction Layer.

Defines the trait interfaces for all hardware-facing abstractions: buses, tick timers, pin routing, MPU, and critical sections. This crate contains no implementations — only the contracts that architecture and driver crates must fulfil.

32-bit targets only. Peripheral addresses and task-stack addresses in the contracts are u32. Saved register-frame layouts belong to architecture crates through [arch::Architecture].

  • arch — Contract between portable kernel state and an architecture’s saved frame.
  • bus — Bus abstraction traits and types.
  • clock — A free-running monotonic microsecond clock.
  • critical_section — Critical section trait.
  • display — The contract between a display panel driver and the interface that moves
  • dma — DMA reachability — the one fact a driver needs before pointing an engine at
  • error — One error type an application can ? into.
  • flash — A word-addressed NOR-flash region, for the key/value store to sit on.
  • interrupt — The one interrupt type a driver or application names: which CPU input a
  • isolation — Fail-closed vocabulary for hardware-isolated tasks. A validated layout is
  • mpu — MPU (Memory Protection Unit) manager trait.
  • pinmux — Pin routing: connecting a peripheral signal to a physical pin.
  • pio — Programmed digital I/O, not an addressed bus. Backends lower this small,
  • power — A low-power sleep primitive, for the SoCs that have one.
  • reset — Reset recovery used by the architecture-neutral panic path.
  • smp — Core identity, for kernels that run on more than one.
  • soc — System-on-chip services used by portable kernel code.
  • stream — Byte streams — the subsystem a UART actually is.
  • tick — Hardware timer tick source trait.
  • timer — A one-shot compare timer: “interrupt me after_us microseconds from now”.
  • types — Core type definitions shared across the kernel, HAL, and API layers.
  • usb — USB device packets, not an addressed SPI/I2C transaction or a byte stream.
  • wifi — Wi-Fi station abstraction — the contract both radio backends satisfy.