refactor(structure): move layered firmware modules from main to components

This commit is contained in:
admin
2026-02-26 10:22:24 +08:00
parent cf1fecb004
commit 044618b4ed
73 changed files with 49 additions and 49 deletions

View File

@@ -1,10 +1,10 @@
idf_component_register(
SRCS
"../../main/app_composition/src/app_main.c"
"src/app_main.c"
INCLUDE_DIRS
"../../main/app_composition/include"
"include"
PRIV_INCLUDE_DIRS
"../../main/app_composition/internal"
"internal"
REQUIRES
control_plane
)

View File

@@ -0,0 +1,8 @@
# App Composition Layer
Purpose: top-level assembly only.
Rules:
- `app_main` wires components, startup order, and shutdown hooks.
- No feature/business logic in composition code.
- No direct hardware operations outside platform abstractions.

View File

View File

@@ -0,0 +1,16 @@
#include "controller_lifecycle.h"
#include "esp_err.h"
#include "esp_log.h"
static const char *TAG = "app_main";
void app_main(void) {
esp_err_t rc = controller_lifecycle_start();
if (rc != ESP_OK) {
ESP_LOGE(TAG, "Controller lifecycle start failed: %s", esp_err_to_name(rc));
return;
}
ESP_LOGI(TAG, "TQ controller started");
}