Microchip® Advanced Software Framework

widget_scr_lpm_wait.c File Reference

Wait mode widget for SAM toolkit demo application.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "demo.h"
#include <asf.h>
#include "string.h"
#include "bitmaps.h"
#include "conf_clock.h"

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 void app_widget_launch_lpm_wait ( void  )
static
void app_widget_lpm_wait_on ( uint8_t  on)

Enable/disable wait mode widget.

Parameters
onTurn 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 void reconfigure_console ( void  )
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
static

Statically allocated context pointer.

struct gfx_bitmap win_lpm_wait_icon
static
Initial value:
= {
.width = 64, .height = 64,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_WAIT_MODE
}
Definition: gfx_generic.h:68
#define DEMO_BMP_WAIT_MODE
Definition: bitmaps.h:59

Wait mode bitmap.

struct gfx_bitmap win_root_logo_icon
static
Initial value:
= {
.width = 87, .height = 40,
.type = GFX_BITMAP_EXT,
.data.custom = DEMO_BMP_LOGO_ATMEL
}
Definition: gfx_generic.h:68
#define DEMO_BMP_LOGO_ATMEL
Definition: bitmaps.h:43

Logo bitmap.