Files
gateway/apps/receiver/main/app_main.cpp
T
2026-04-29 18:53:26 +08:00

38 lines
788 B
C++

#include "gateway_core.hpp"
#include "gateway_runtime.hpp"
namespace {
constexpr const char* kProjectName = "UartRelayer";
constexpr const char* kProjectVersion = "0.1.0";
gateway::BootProfile ReceiverProfile() {
return gateway::BootProfile{
gateway::AppRole::kReceiver,
"receiver",
false,
false,
false,
true,
true,
};
}
} // namespace
extern "C" void app_main(void) {
ESP_ERROR_CHECK(gateway::InitializeRuntimeNvs());
gateway::GatewayCore core(ReceiverProfile());
core.start();
gateway::GatewayRuntime runtime(
core.profile(),
gateway::GatewayRuntimeConfig{
kProjectName,
kProjectVersion,
gateway::ReadRuntimeSerialId(),
},
nullptr);
ESP_ERROR_CHECK(runtime.start());
}