lukeweston / artemis

Open-source (and open hardware) Arduino-based telemetry and instrumentation module for amateur rocketry

This URL has Read+Write access

artemis / DS1307.h
100644 16 lines (12 sloc) 0.319 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class DS1307 {
  public:
    DS1307();
    void read();
    void set();
    
    unsigned char second_, minute_, hour_, dayOfWeek_, dayOfMonth_, month_, year_;
    
  private:
    bool isSetUp_;
    
    unsigned char bcdToDecimal(unsigned char x);
    unsigned char decimalToBCD(unsigned char x);
    void setup();
};