Added firmware manager skeleton
This commit is contained in:
@@ -11,6 +11,8 @@ project(app LANGUAGES C)
|
||||
|
||||
target_sources(app
|
||||
PRIVATE
|
||||
src/FirmwareManager.cpp
|
||||
src/FirmwareManager.hpp
|
||||
src/main.cpp
|
||||
src/SensorDataProcessor.cpp
|
||||
src/SensorDataProcessor.hpp
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Nordic Semiconductor ASA
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "FirmwareManager.hpp"
|
||||
#include "SensorDataProcessor.hpp"
|
||||
#include "SensorSampler.hpp"
|
||||
#include <app_version.h>
|
||||
@@ -11,6 +7,13 @@
|
||||
|
||||
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
|
||||
static constexpr size_t SensorDataProcessorStackSize = 1024;
|
||||
static constexpr size_t SensorDataProcessorPriority = 5;
|
||||
|
||||
Reference in New Issue
Block a user