42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
#include "FirmwareManager.hpp"
|
|
#include "SensorDataProcessor.hpp"
|
|
#include "SensorSampler.hpp"
|
|
#include <app_version.h>
|
|
#include <zephyr/kernel.h>
|
|
#include <zephyr/logging/log.h>
|
|
|
|
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;
|
|
K_THREAD_DEFINE(SensorDataProcessorThreadId, SensorDataProcessorStackSize,
|
|
app::SensorDataProcessor::entryPoint, NULL, NULL, NULL,
|
|
SensorDataProcessorPriority, 0, 0);
|
|
|
|
// Sensor Sampler
|
|
static constexpr size_t SensorSamplerStackSize = 1024;
|
|
static constexpr size_t SensorSamplerPriority = 5;
|
|
K_THREAD_DEFINE(SensorSamplerThreadId, SensorSamplerStackSize,
|
|
app::SensorSampler::entryPoint, NULL, NULL, NULL,
|
|
SensorSamplerPriority, 0, 0);
|
|
|
|
int main() {
|
|
printk("Zephyr Example Application %s\n", APP_VERSION_STRING);
|
|
printk("Build with C++ standard: %ldL\n", __cplusplus);
|
|
|
|
while (true) {
|
|
printk("main - Running...\n");
|
|
k_sleep(K_SECONDS(5));
|
|
}
|
|
|
|
return 0;
|
|
}
|