pp

Dependencies:   mbed

Committer:
Peeraya
Date:
Wed Dec 09 02:09:36 2015 +0000
Revision:
5:60262753a05f
Parent:
0:b2064b3558b6
Super Cute Alarm Clock

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Peeraya 0:b2064b3558b6 1 #ifndef DS1307_H
Peeraya 0:b2064b3558b6 2 #define DS1307_H
Peeraya 0:b2064b3558b6 3
Peeraya 0:b2064b3558b6 4 #include "mbed.h"
Peeraya 0:b2064b3558b6 5 #define DS1307_ADDRESS 0xD0
Peeraya 0:b2064b3558b6 6
Peeraya 0:b2064b3558b6 7 class DS1307
Peeraya 0:b2064b3558b6 8 {
Peeraya 0:b2064b3558b6 9 public:
Peeraya 0:b2064b3558b6 10 DS1307(PinName,PinName);
Peeraya 0:b2064b3558b6 11 int bcdtodec(int);
Peeraya 0:b2064b3558b6 12 int dectobcd(int);
Peeraya 0:b2064b3558b6 13 void settime(int sec,int min,int hour,int day,int date,int month,int year);
Peeraya 0:b2064b3558b6 14 void gettime(int *sec,int *min,int *hour,int *day,int *date,int *month,int *year);
Peeraya 0:b2064b3558b6 15 private:
Peeraya 0:b2064b3558b6 16 I2C rtc;
Peeraya 0:b2064b3558b6 17 };
Peeraya 0:b2064b3558b6 18
Peeraya 0:b2064b3558b6 19 #endif