Verified Commit 3f4b9a52 authored by Jakob Moser's avatar Jakob Moser
Browse files

Add simple Display driver

parent aadae40c
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
from dataclasses import dataclass
from pathlib import Path


@dataclass(frozen=True)
class Display:
    framebuffer_path: Path
    width: int
    height: int

    def show(self, picture: bytes) -> None:
        with self.framebuffer_path.open("wb") as f:
            f.write(picture)