Atmel Software Framework

date_time.c File Reference

Display current date and time.

Copyright (c) 2011-2015 Atmel Corporation. All rights reserved.

#include "stdio.h"
#include "keyboard.h"
#include "rtc32.h"
#include "calendar.h"
#include "sysfont.h"
#include "timezone.h"
#include "date_time.h"
#include "gfx_mono_menu.h"
#include "gfx_mono_spinctrl.h"

Functions

void date_time_application (void)
 Show a menu presenting the date and time applications. More...
 
static void display_date_time_application (void)
 Display current date and time in the selected timezone. More...
 
 PROGMEM_DECLARE (char const, datetime_menu_title[])
 
 PROGMEM_DECLARE (char const, datetime_menu_1[])
 
 PROGMEM_DECLARE (char const, datetime_menu_2[])
 
 PROGMEM_DECLARE (char const, datetime_menu_3[])
 
 PROGMEM_DECLARE (char const, datetime_menu_4[])
 
 PROGMEM_DECLARE (char const, datetime_date_spinner_string_year[])
 
 PROGMEM_DECLARE (char const, datetime_date_spinner_string_month[])
 
 PROGMEM_DECLARE (char const, datetime_date_spinner_string_day[])
 
 PROGMEM_DECLARE (char const, datetime_date_spinner_string_hour[])
 
 PROGMEM_DECLARE (char const, datetime_date_spinner_string_minute[])
 
 PROGMEM_DECLARE (char const, datetime_invalid_date_string[])
 
static void set_date_application (void)
 Set the date using a spinner widget. More...
 
static void set_time_application (void)
 Set the time using a spinner widget. More...
 

Variables

struct gfx_mono_menu datetime_menu
 
PROGMEM_STRING_T datetime_menu_strings []
 
char * day []
 Weekday shortnames. More...
 

PROGMEM_DECLARE ( char  const,
datetime_menu_title  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_menu_1  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_menu_2  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_menu_3  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_menu_4  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_date_spinner_string_year  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_date_spinner_string_month  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_date_spinner_string_day  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_date_spinner_string_hour  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_date_spinner_string_minute  [] 
)
PROGMEM_DECLARE ( char  const,
datetime_invalid_date_string  [] 
)

struct gfx_mono_menu datetime_menu
Initial value:
= {
datetime_menu_title,
4,
0
}
PROGMEM_STRING_T datetime_menu_strings[]
Definition: date_time.c:64
PROGMEM_STRING_T datetime_menu_strings[]
Initial value:
= {
datetime_menu_1,
datetime_menu_2,
datetime_menu_3,
datetime_menu_4,
}
char* day[]
Initial value:
= {
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
}

Weekday shortnames.

Referenced by display_date_time_application().