Added firmware manager skeleton

This commit is contained in:
2026-04-23 21:08:56 -07:00
parent 37fef28911
commit ae53d7f7f3
4 changed files with 37 additions and 5 deletions
+2
View File
@@ -11,6 +11,8 @@ project(app LANGUAGES C)
target_sources(app target_sources(app
PRIVATE PRIVATE
src/FirmwareManager.cpp
src/FirmwareManager.hpp
src/main.cpp src/main.cpp
src/SensorDataProcessor.cpp src/SensorDataProcessor.cpp
src/SensorDataProcessor.hpp src/SensorDataProcessor.hpp
+9
View File
@@ -0,0 +1,9 @@
#include "FirmwareManager.hpp"
#include <zephyr/kernel.h>
void app::FirmwareManager::entryPoint(void *, void *, void *) {
while (true) {
printk("app::FirmwareManager::entryPoint - Running...\n");
k_sleep(K_SECONDS(5));
}
}
+18
View File
@@ -0,0 +1,18 @@
#ifndef FIRMWARE_MANAGER_HPP
#define FIRMWARE_MANAGER_HPP
namespace app {
class FirmwareManager {
public:
FirmwareManager() = default;
~FirmwareManager() = default;
static void entryPoint(void *, void *, void *);
private:
};
} // namespace app
#endif
+8 -5
View File
@@ -1,8 +1,4 @@
/* #include "FirmwareManager.hpp"
* Copyright (c) 2021 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
#include "SensorDataProcessor.hpp" #include "SensorDataProcessor.hpp"
#include "SensorSampler.hpp" #include "SensorSampler.hpp"
#include <app_version.h> #include <app_version.h>
@@ -11,6 +7,13 @@
LOG_MODULE_REGISTER(main, CONFIG_APP_LOG_LEVEL); LOG_MODULE_REGISTER(main, CONFIG_APP_LOG_LEVEL);
// Firmware Manager
static constexpr size_t FirmwareManagerStackSize = 1024;
static constexpr size_t FirmwareManagerPriority = 5;
K_THREAD_DEFINE(FirmwareManagerThreadId, FirmwareManagerStackSize,
app::FirmwareManager::entryPoint, NULL, NULL, NULL,
FirmwareManagerPriority, 0, 0);
// Sensor Data Processor // Sensor Data Processor
static constexpr size_t SensorDataProcessorStackSize = 1024; static constexpr size_t SensorDataProcessorStackSize = 1024;
static constexpr size_t SensorDataProcessorPriority = 5; static constexpr size_t SensorDataProcessorPriority = 5;