#include "controller_lifecycle.h" #include "esp_log.h" #include "printer_protocol.h" #include "rest_server.h" #include "system_runtime.h" static const char *TAG = "controller_lifecycle"; esp_err_t controller_lifecycle_start(void) { ESP_LOGI(TAG, "Starting system runtime"); ESP_ERROR_CHECK(system_runtime_bootstrap()); ESP_LOGI(TAG, "Starting printer protocol"); ESP_ERROR_CHECK(printer_protocol_init()); ESP_LOGI(TAG, "Starting REST server"); ESP_ERROR_CHECK(rest_server_start()); return ESP_OK; } void controller_lifecycle_stop(void) { rest_server_stop(); printer_protocol_disconnect(); ESP_LOGI(TAG, "Controller lifecycle stopped"); }