#ifndef __MAINCONTROL_H_
#define __MAINCONTROL_H_

#define ADDR_START_EEPROM_DATE  100

static  const uint8_t DAYS[] = {31,28,31,30,31,30,31,31,30,31,30,31};
#define LEAP_YEAR(Y)     ( ((Y)>0) && !((Y)%4) && ( ((Y)%100) || !((Y)%400) ) )

void initUserApp();
bool getAlarmEnabled();
bool getAlarmStarted();
void checkButton();
void dispClock();
void checkAlarm();
void onAlarm();
void checkUSB();
void rewriteDate();

#endif
