test/hurricane/main.c

/*******************************************************************************
* # License
* Copyright 2019 Silicon Laboratories Inc. www.silabs.com
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
#include "gos.h"
#include "hurricane.h"
#define APPLICATION_START_LINE "\r\n\r\nHurricane Regression!!"
#define DEMO_NAME "Hurricane Regression"
static void start_demo_handler(void *arg);
static void stop_demo_handler(void *arg);
static int show_splash_screen(void *arg);
hurricane_demo_t demo_info =
{ .demo_name = DEMO_NAME,
.start_demo_callback = start_demo_handler,
.stop_demo_callback = stop_demo_handler,
.draw_splash_screen_callback = show_splash_screen,
.demo_splash_screen_arg = "splash.jpg",
.splash_font_color = HURRICANE_SPLASH_DEFAULT_FONT_COLOR,
};
void gos_app_init(void)
{
GOS_LOG(APPLICATION_START_LINE);
hurricane_init(&demo_info);
}
void gos_app_deinit(void)
{
}
void gos_app_idle(void)
{
}
#define APPLICATION_SPLASH_SCREEN_LOG "Splash Screen Started"
static int show_splash_screen(void *arg)
{
GOS_LOG(APPLICATION_SPLASH_SCREEN_LOG);
HURRICANE_SPLASH_DEFAULT_FUNCTION(demo_info.demo_splash_screen_arg);
return GOS_SUCCESS;
}
#define APPLICATION_START_HURRICANE_DEMO_LOG "Hurricane Demo Started"
static void start_demo_handler(void *arg)
{
GOS_LOG(APPLICATION_START_HURRICANE_DEMO_LOG);
hurricane_draw_message_screen("Hurricane Regression Demo Started", GUI_TA_LEFT | GUI_TA_TOP, "", "");
}
static void stop_demo_handler(void *arg)
{
}