zephyr_ha_mqtt_sample/src/main.c

24 lines
609 B
C

#include <zephyr/kernel.h>
#include <zephyr/settings/settings.h>
#include <zephyr/net/wifi_mgmt.h>
#include <zephyr/logging/log.h>
#include "net.h"
LOG_MODULE_REGISTER(mqtt_gw, CONFIG_LOG_DEFAULT_LEVEL);
/**
* @brief Main application entry point.
*
* This function initializes the MQTT gateway application. It logs the board
* name and initializes the network stack.
*
* @return 0 on success, otherwise a negative error code.
*/
int main(void) {
k_sleep(K_MSEC(100)); // Allow time for logging initialization
LOG_INF("MQTT Gateway. Board: %s", CONFIG_BOARD);
net_init();
return 0;
}