/**
 * @copyright Copyright (C) 2023 <Company-Name>. All rights reserved.
 */

#include <cstdio>
{% if project.is_atsam() %}
#if ATSAM
#include <sam.h>
#endif  // ATSAM
{% endif %}
{% if project.is_esp32() %}
#if ESP32
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_log.h>

extern "C"
{
    void app_main(void);  // NOLINT(readability-identifier-naming): name required by freertos
}

/**
 * @brief Main freeRTOS task
 *
 */
void app_main(void)  // NOLINT(readability-identifier-naming): name required by freertos
{
    for (;;)
    {
        vTaskDelay(pdMS_TO_TICKS(50));
    }
}
#endif  // ESP32
{% endif %}
{% if project.is_x86() or project.is_atsam() or project.is_stm32() %}
#ifndef ESP32
/**
 * @brief This is example function doc
 *
 * @return int 0 if all good
 */
int main()
{
    {% if project.is_x86() %}
#ifdef X86
    printf("Hello World!\n");
#endif  // X86
    {% else %}
#if defined STM32 || defined ATSAM
    while (true)
    {
    }
#endif  // STM32 || ATSAM
    {% endif %}
    return 0;
}
#endif  // !ESP32
{% endif %}