Skip to main content

Crate ssh_stamp_esp32

Crate ssh_stamp_esp32 

Source

Re-exports§

pub use flash::EspOtaWriter;
pub use flash::FlashBuffer;
pub use flash::get_flash_n_buffer;
pub use flash::init as flash_init;
pub use esp_alloc;
pub use esp_bootloader_esp_idf;
pub use esp_hal;
pub use esp_println;
pub use esp_rtos;
pub use getrandom;
pub use log;
pub use ssh_stamp;

Modules§

bench
ESP32 heap instrumentation for benchmarking.
flash
Flash storage and OTA implementation for ESP32 family

Macros§

boot
The ssh-stamp boot sequence, which does heap allocation, esp_hal::init, configures the entropy source, flash storage and the esp-rtos scheduler.
getrandom_backend
Defines the getrandom custom backend, which is an unsafe extern "Rust" symbol that fills a buffer from the hardware RNG registered by init_entropy!. This is what the SSH host key and the WiFi password use, so it must be a true and secure source of randomness.
init_entropy
Creates the boot entropy source and registers the hardware RNG with getrandom.
init_heap
Creates the global heap allocator using ssh_stamp::settings::HEAP_SIZE.
start_rtos
Starts the esp-rtos scheduler on TIMG1 for original ESP32 and SYSTIMER everywhere else. This registers the embassy time driver, so it must run before anything that uses embassy-time.

Structs§

BufferedCan
Bidirectional pipe buffer between the TWAI peripheral and the SSH can subsystem bridge. Traffic in both pipes is framed by the codec layer (slcan lines or GVRET binary messages).
BufferedUart
Bidirectional pipe buffer for UART communications.
EntropySource
This is a wrapper that sets up the boot entropy source.
EspCanPins
CAN pins configuration.
EspHmac
ESP32 HMAC implementation
EspPlatform
Handle through which the app layer reaches ESP-only services.
EspRng
ESP32 RNG implementation
EspTimer
ESP32 Timer implementation using Embassy time
EspUartPins
UART pins configuration.
EspWifi
Handle for bringing up ESP32-family WiFi as an access point.

Statics§

CAN_BUF
Static storage for the buffered CAN singleton.
UART_BUF
Static storage for the buffered UART singleton.
UART_SIGNAL
Signal raised by ssh_stamp::platform::PlatformServices::activate_uart to release uart_task from its initial wait.

Functions§

accept_requests
Accept an incoming TCP connection on port 22. Returns a connected TcpSocket ready for SSH processing.
can_task
Embassy task that owns the hardware TWAI peripheral and pumps it through BufferedCan::run. Spawn from a higher-priority InterruptExecutor for lower latency.
dhcp_server
DHCP server task for Embassy executor.
entropy_source_active
Whether an entropy source is currently using the RNG register.
init_entropy
Enables true random number generation and registers the hardware RNG with getrandom, which is used by the SSH host key and the WiFi password.
mac_address
Read the device’s hardware MAC address from eFuse.
net_up
Network task for Embassy executor.
register_custom_rng
Register the hardware RNG for use with getrandom
rng_fill_bytes
Safe half of the getrandom custom backend: fills buf from the registered hardware RNG.
spawn_uart
Creates the BufferedUart singleton and spawns uart_task on the given spawner, returning the buffer the rest of the system talks to. The firmware feeds it the spawner from start_interrupt_executor, so the task runs at interrupt priority. The task waits on UART_SIGNAL before touching the hardware.
start_interrupt_executor
Starts the InterruptExecutor on the FROM_CPU_INTR1 left over from start_rtos!, and returns its spawner.
uart_task
Embassy task that owns the hardware UART and pumps it through BufferedUart::run. Spawn from a higher-priority InterruptExecutor for lower latency.
wifi_up
Manages the WiFi access point lifecycle.