Patrick Jackson / Mbed 2 deprecated Clock

Dependencies:   EthernetNetIf NTPClient_NetServices mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.h Source File

main.h

00001 #include "mbed.h"
00002 #include "EthernetNetIf.h"
00003 #include "NTPClient.h"
00004 #include "TextLCD.h"
00005 
00006 /****************** Class Global Declartions **********************/
00007 EthernetNetIf eth; 
00008 NTPClient ntp;
00009 TextLCD lcd(p5, p6, p7, p8, p9, p10);
00010 InterruptIn statechange(p23);
00011 InterruptIn plus(p22);
00012 InterruptIn minus(p21);
00013 Ticker ring;
00014 BusOut led(LED1, LED2, LED3, LED4);
00015 /******************************************************************/
00016 /***************** Standard Global Declartions ********************/
00017 
00018 int menu = 0;           // Holds the current menu information 
00019 int timezone = 0;       // Timezone is configured as UTC + timezone - 12
00020 bool alarmstate = false;// Determines whether the alarm is set or not
00021 bool ringflag = false;  // Determines if alarm is ringing
00022 bool snooze = false;    // True if the alarm has been turned off by a button
00023 struct tm *cTime;       // Stucture that holds the current time
00024 int ahour;              // Value that holds alarm hour
00025 int amin;               // Value that holds alarm minute
00026 /******************************************************************/
00027 /*********************** Function Declartions *********************/
00028 void print_lcd();
00029 void print_time(int, int);
00030 void print_menu();
00031 void change_menu();
00032 void button_press(int);
00033 void push_plus();
00034 void push_minus();
00035 void alarm_ring();
00036 void alarm_snooze();
00037 void alarm_check();
00038 /******************************************************************/