refactor(structure): move layered firmware modules from main to components
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
8
components/app_composition/README.md
Normal file
8
components/app_composition/README.md
Normal 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.
|
||||
0
components/app_composition/include/.gitkeep
Normal file
0
components/app_composition/include/.gitkeep
Normal file
0
components/app_composition/internal/.gitkeep
Normal file
0
components/app_composition/internal/.gitkeep
Normal file
0
components/app_composition/src/.gitkeep
Normal file
0
components/app_composition/src/.gitkeep
Normal file
16
components/app_composition/src/app_main.c
Normal file
16
components/app_composition/src/app_main.c
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user