Sleep mode widget for SAM toolkit demo application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context_lpm_sleep |
Widget application context. More... | |
Functions | |
static void | app_widget_launch_lpm_sleep (void) |
Setup sleep mode widget. More... | |
void | app_widget_lpm_sleep_on (uint8_t on) |
Enable/disable sleep mode widget. More... | |
Variables | |
static char | demo_func_name [] = "Low-Power Mode" |
static const uint32_t | sleep_wakeup_pin = LPM_WAKEUP_INPUT_ID |
Wakeup PIN. More... | |
static char | str_sleep_mode [] = "Sleep Mode" |
static char | str_sleep_ret [] = "Touch the screen\n to wake-up" |
static struct widget_context_lpm_sleep * | widget_ctx_lpm_sleep |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_lpm_sleep_icon |
Sleep bitmap. More... | |
static struct gfx_bitmap | win_root_logo_icon |
Logo bitmap. More... | |
|
static |
Setup sleep mode widget.
Allocates memory for the application context, and creates all widgets that make up its interface. If memory allocation or widget creation fails, the application exits immediately.
References win_attributes::area, configMAX_SYSCALL_INTERRUPT_PRIORITY, demo_board_name, demo_func_name, demo_set_special_mode_status(), DEMO_SLEEP_MODE, GFX_BITMAP_SOLID, GFX_COLOR, membag_alloc(), membag_free(), NULL, win_window::parent, pmc_enable_sleepmode(), win_area::pos, win_area::size, sleep_wakeup_pin, str_sleep_mode, str_sleep_ret, supc_set_wakeup_inputs(), taskENTER_CRITICAL, taskEXIT_CRITICAL, win_destroy(), win_get_attributes(), win_get_root(), win_show(), wtk_basic_frame_as_child(), wtk_basic_frame_create(), wtk_label_as_child(), wtk_label_create(), wtk_label_size_hint(), win_point::x, and win_point::y.
Referenced by app_widget_lpm_sleep_on().
void app_widget_lpm_sleep_on | ( | uint8_t | on | ) |
Enable/disable sleep mode widget.
on | Turn on/off sleep mode widget. |
References app_widget_launch_lpm_sleep(), widget_context_lpm_sleep::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by widget_lpm_command_handler().
|
static |
Referenced by app_widget_launch_lpm_sleep().
|
static |
Wakeup PIN.
Referenced by app_widget_launch_lpm_sleep().
|
static |
Referenced by app_widget_launch_lpm_sleep().
|
static |
Referenced by app_widget_launch_lpm_sleep().
|
static |
Statically allocated context pointer.
|
static |
Sleep bitmap.
|
static |
Logo bitmap.