add all crates: domain, protocol, application, client, adapters, ESP32 firmware

Server: domain (entities, value objects, ports), protocol (postcard wire types),
application (config service, data projection), adapters (config-memory, tcp-server),
bootstrap (composition root with fake data).

Client: client-domain (layout engine, render tree, HAL ports),
client-application (message handling, repaint commands),
adapters (tcp-client, display-terminal), client-desktop (end-to-end working).

ESP32: client-esp32 firmware with ILI9341 display over SPI, WiFi networking.
Display test verified on hardware — landscape orientation, text rendering works.

60 workspace tests, all passing.
This commit is contained in:
2026-06-18 21:43:59 +02:00
parent 6ad76b98a2
commit 557cceb498
83 changed files with 5844 additions and 1 deletions

View File

@@ -0,0 +1,45 @@
mod adapters;
mod config;
mod hal;
mod tasks;
use client_domain::{BoundingBox, DisplayPort};
use esp_idf_hal::peripherals::Peripherals;
use log::info;
fn main() {
esp_idf_svc::sys::link_patches();
esp_idf_svc::log::EspLogger::initialize_default();
info!("=== K-Frame ESP32 ===");
let peripherals = Peripherals::take().unwrap();
let mut display = hal::display::init(hal::display::DisplayHardware {
spi: peripherals.spi2,
sclk: peripherals.pins.gpio18.into(),
mosi: peripherals.pins.gpio23.into(),
cs: peripherals.pins.gpio26.into(),
dc: peripherals.pins.gpio21.into(),
rst: peripherals.pins.gpio22.into(),
});
info!("Display initialized");
display.fill_background(config::SCREEN).unwrap();
display.draw_text(
"K-Frame",
10, 10,
BoundingBox::new(10, 10, 220, 40),
).unwrap();
display.draw_text(
"Display test OK",
10, 60,
BoundingBox::new(10, 60, 220, 40),
).unwrap();
display.flush().unwrap();
info!("Display test complete — looping forever");
loop {
std::thread::sleep(std::time::Duration::from_secs(1));
}
}