Microchip® Advanced Software Framework

widget_scr_lpm_sleep.c File Reference

Sleep 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"

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...
 

void app_widget_lpm_sleep_on ( uint8_t  on)

Enable/disable sleep mode widget.

Parameters
onTurn 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().

char demo_func_name[] = "Low-Power Mode"
static
const uint32_t sleep_wakeup_pin = LPM_WAKEUP_INPUT_ID
static

Wakeup PIN.

Referenced by app_widget_launch_lpm_sleep().

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
static

Statically allocated context pointer.

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

Sleep 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.