This commit is contained in:
admin
2026-02-24 18:10:40 +08:00
commit 9e141b8de0
55 changed files with 7172 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#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");
}