Wait mode widget for SAM toolkit demo application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | widget_context_lpm_wait |
Widget application context. More... | |
Macros | |
#define | PLLA_COUNT 0x3Fu |
PLLA count. More... | |
#define | WAKEUP_WAIT_INPUT_ID LPM_WAKEUP_INPUT_ID |
Wakeup pin for wait mode: Touchscreen controller IRQ pin. More... | |
Functions | |
static void | app_widget_launch_lpm_wait (void) |
Setup wait mode widget. More... | |
void | app_widget_lpm_wait_on (uint8_t on) |
Enable/disable wait mode widget. More... | |
static void | reconfigure_console (void) |
Configure UART console. More... | |
static void | sys_enter_wait_mode (void) |
System enter wait mode. More... | |
Variables | |
static char | demo_func_name [] = "Low-Power Mode" |
static char | str_wait_mode [] = "Wait Mode" |
static char | str_wait_ret [] = "Touch the screen\n to wake-up" |
static struct widget_context_lpm_wait * | widget_ctx_lpm_wait |
Statically allocated context pointer. More... | |
static struct gfx_bitmap | win_lpm_wait_icon |
Wait mode bitmap. More... | |
static struct gfx_bitmap | win_root_logo_icon |
Logo bitmap. More... | |
#define PLLA_COUNT 0x3Fu |
PLLA count.
Referenced by sys_enter_wait_mode().
#define WAKEUP_WAIT_INPUT_ID LPM_WAKEUP_INPUT_ID |
Wakeup pin for wait mode: Touchscreen controller IRQ pin.
Referenced by sys_enter_wait_mode().
|
static |
Setup wait 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, demo_board_name, demo_func_name, demo_set_special_mode_status(), DEMO_WAIT_MODE, GFX_BITMAP_SOLID, GFX_COLOR, membag_alloc(), membag_free(), win_window::parent, win_area::pos, win_area::size, str_wait_mode, str_wait_ret, sys_enter_wait_mode(), 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_wait_on().
void app_widget_lpm_wait_on | ( | uint8_t | on | ) |
Enable/disable wait mode widget.
on | Turn on/off wait mode widget. |
References app_widget_launch_lpm_wait(), widget_context_lpm_wait::frame, win_destroy(), and wtk_basic_frame_as_child().
Referenced by widget_lpm_command_handler().
|
static |
Configure UART console.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_PARITY, CONSOLE_UART_ID, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by sys_enter_wait_mode().
|
static |
System enter wait mode.
References BOARD_OSC_STARTUP_US, CONFIG_PLL0_MUL, PLLA_COUNT, pmc_disable_pllack(), pmc_enable_pllack(), pmc_enable_waitmode(), pmc_osc_disable_xtal(), pmc_set_fast_startup_input(), pmc_switch_mainck_to_fastrc(), pmc_switch_mainck_to_xtal(), pmc_switch_mck_to_mainck(), pmc_switch_mck_to_pllack(), pmc_switch_mck_to_sclk(), reconfigure_console(), rtc_disable_interrupt(), taskENTER_CRITICAL, taskEXIT_CRITICAL, and WAKEUP_WAIT_INPUT_ID.
Referenced by app_widget_launch_lpm_wait().
|
static |
Referenced by app_widget_launch_lpm_wait().
|
static |
Referenced by app_widget_launch_lpm_wait().
|
static |
Referenced by app_widget_launch_lpm_wait().
|
static |
Statically allocated context pointer.
|
static |
Wait mode bitmap.
|
static |
Logo bitmap.