Skip to main content

Module platform

Module platform 

Source
Expand description

Platform services abstraction.

The HSM and SSH handlers call into the running platform for three things that can’t be expressed as a pure HAL trait (because they touch app-layer state like SSHStampConfig or the serial bridge):

  • persisting the SSH-stamp config to non-volatile storage,
  • resetting the device,
  • minting an OtaActions writer for the SFTP OTA session,
  • signalling the serial bridge that SSH is ready and the UART task should wake up.

Each platform crate provides one impl (for ESP32: EspPlatform). Consumers take &impl PlatformServices so the same app code runs on every MCU port.

Traits§

PlatformServices
Platform-owned services the app layer cannot provide on its own.