docs/reference/system-functional/hardware-drivers.md
The driver layer provides hardware abstraction components that bridge the flight software's port-based communication model to physical hardware interfaces. Drivers implement standardized FPP interfaces so that higher-level components can interact with hardware through typed ports without knowledge of the underlying hardware specifics. The primary driver model is the byte stream interface, which is used for serial, network, and other stream-oriented communication. Additional interfaces cover GPIO, I2C, and SPI peripherals.
The F Prime core framework ships Linux-specific driver implementations. Other operating system and hardware platform support is provided by additional packages outside the core repository.
The byte stream model defines a generic interface for drivers that operate with bidirectional byte streams. It provides:
Two variants of the model exist:
Buffer adapters bridge the communication stack's buffer-based interface to the byte stream driver model. They handle buffer lifecycle management (allocation and deallocation) between the communication components and the underlying driver:
F Prime provides network communication drivers that implement the byte stream model:
These drivers share a common IP helper layer that provides socket management, address configuration, and connection handling.
The Linux UART Driver provides byte stream access to serial ports on Linux systems. It implements the byte stream driver model, allowing it to be used interchangeably with network drivers in the communication stack.
The GPIO interface provides read, write, and interrupt signaling for individual General Purpose Input/Output pins. The Linux GPIO Driver implements this interface using the Linux GPIO character device interface.
The I2C interface provides read, write, and combined write-then-read operations for Inter-Integrated Circuit bus communication. The Linux I2C Driver implements this interface using the Linux I2C device interface.
The SPI interface provides read and write operations for Serial Peripheral Interface bus communication. The Linux SPI Driver implements this interface using the Linux SPI device interface.