- move runtime policy/diag contracts to domain-owned facade and remove control_plane leapfrog usage - enforce single declaration point for direct debug config in domain public API (constraint #6) - harden timeout/idempotent semantics in REST/voice/printer/wifi/ble paths
35 lines
734 B
C
35 lines
734 B
C
#include "domain.h"
|
|
#include "platform.h"
|
|
|
|
esp_err_t system_runtime_start(void) {
|
|
esp_err_t err = platform_bootstrap_init();
|
|
if (err != ESP_OK) {
|
|
return err;
|
|
}
|
|
|
|
err = wifi_manager_start();
|
|
if (err != ESP_OK) {
|
|
// Reset platform state so lifecycle retry runs from a clean baseline.
|
|
(void)wifi_manager_stop();
|
|
return err;
|
|
}
|
|
|
|
return ESP_OK;
|
|
}
|
|
|
|
esp_err_t system_runtime_shutdown(void) {
|
|
return wifi_manager_stop();
|
|
}
|
|
|
|
esp_err_t system_runtime_bootstrap(void) {
|
|
return system_runtime_start();
|
|
}
|
|
|
|
bool system_runtime_wifi_ready(void) {
|
|
return wifi_manager_is_ready();
|
|
}
|
|
|
|
void system_runtime_get_ip(char *buf, size_t buf_len) {
|
|
wifi_manager_get_ip(buf, buf_len);
|
|
}
|