/****************************************************************************/
/* Copyright 2010 MBARI.                                                    */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
#ifndef RTCC_H
#define RTCC_H

typedef struct
{
    unsigned char year;
    unsigned char month;
    unsigned char day;
    unsigned char day_of_week;
    unsigned char hours;
    unsigned char minutes;
    unsigned char seconds;
    unsigned char half_second;
} DateTime;


typedef struct
{
    int year;
    int month;
    int day;
    int day_of_week;
    int hours;
    int minutes;
    int seconds;
} IntDateTime;


void rtcInit();

int rtcSet(DateTime* dt);
int rtcRead(DateTime* dt);
int rtcDateToString(DateTime* dt, char* date_str);
int rtcTimeToString(DateTime* dt, char* time_str);


#endif
