#include "HardwareInfo.c"
#include <SetNS.h>
#include <GetCalendar.h>
#include <SetLCD3Char.h>
#include <SetLCD1Char.h>

int main(void)
{
    unsigned char sec = 0;
    unsigned char min = 0;
    unsigned char hour = 0;
    unsigned char date = 0;
    unsigned char month = 0;
    unsigned char day = 0;
    unsigned char year = 0;
    unsigned char temp = 0;
    unsigned char week = 0;
    SetNS(1);
    while (1)
    {
        year = GetCalendar(_CALENDAR_1_, 30);
        SetLCD3Char(2, year);
        SetLCD1Char(3, '-');
        month = GetCalendar(_CALENDAR_1_, 31);
        SetLCD3Char(4, month);
        SetLCD1Char(6, '-');
        date = GetCalendar(_CALENDAR_1_, 32);
        SetLCD3Char(7, date);
        hour = GetCalendar(_CALENDAR_1_, 33);
        SetLCD3Char(9, hour);
        SetLCD1Char(11, ':');
        min = GetCalendar(_CALENDAR_1_, 34);
        SetLCD3Char(12, min);
        SetLCD1Char(14, ':');
        sec = GetCalendar(_CALENDAR_1_, 35);
        SetLCD3Char(15, sec);
        SetNS(2);
        temp = GetCalendar(_CALENDAR_1_, 37);
        SetLCD1Char(9, 'T');
        SetLCD1Char(10, 'e');
        SetLCD1Char(11, 'm');
        SetLCD1Char(12, 'p');
        SetLCD1Char(13, ':');
        SetLCD3Char(14, temp);
        SetNS(2);
    }
    return 1;
}

