Main.c for the Hurricane Hello World Tutorial

/*
 * EVALUATION AND USE OF THIS SOFTWARE IS SUBJECT TO THE TERMS AND
 * CONDITIONS OF THE CONTROLLING LICENSE AGREEMENT FOUND AT LICENSE.md
 * IN THIS SDK. IF YOU DO NOT AGREE TO THE LICENSE TERMS AND CONDITIONS,
 * PLEASE RETURN ALL SOURCE FILES TO SILICON LABORATORIES.
 * (c) Copyright 2018, Silicon Laboratories Inc.  All rights reserved.
 */
/*
 * Documentation for this app is available online.
 * See https://docs.silabs.com/gecko-os/4/standard/latest/sdk/examples/intro/hello-world
 */

#include "gos.h"
#include "hurricane.h"

#define APPLICATION_START_LINE "\r\n\r\nHello world!!"


hurricane_demo_t demo_info =
{ .demo_name                   = "Hello World",                       // Demo name used on LCD
  .start_demo_callback         = start_demo_handler,                  // Function called when user selects Run
  .stop_demo_callback          = stop_demo_handler,                   // Function called when leaving the demo and returning to hurricane setup
  .draw_splash_screen_callback = NULL,                                // NULL = Do not override splash screen display function
  .demo_splash_screen_arg      = NULL,                                // Splash screen jpeg file.  NULL = text only
  .splash_font_color           = HURRICANE_SPLASH_DEFAULT_FONT_COLOR, // Color of the splash screen navigation text
  .splash_screen_timeout_ms    = 0                                    // Splash screen timeout (0 = no timeout)
};


/*************************************************************************************************/
void gos_app_init(void)
{
    hurricane_init(&demo_info);
}

/*************************************************************************************************/
static void start_demo_handler(void *arg)
{
    // Print to the log bus
    GOS_LOG(APPLICATION_START_LINE);

    //Print to the LCD
    hurricane_draw_message_screen("Hello World", GUI_TA_HCENTER | GUI_TA_VCENTER, "", "");
}

/*************************************************************************************************/
static void stop_demo_handler(void *arg)
{  GOS_LOG("Exiting Hurricane Demo");
}

/*************************************************************************************************/
void gos_app_deinit(void)
{
    // This API is called just before the application finishes.
    // Anything initialized or allocated by the app should be cleaned here.
    // This API is optional.
}


/*************************************************************************************************/
void gos_app_idle(void)
{
    // This is called when the event thread has no more pending events.

}