Code to interface with the MCP7940 Real time clock. Supports getting and setting the time in 24 hour format
Diff: MCP7490.cpp
- Revision:
- 1:8f330348d96b
- Parent:
- 0:36c08b11e691
- Child:
- 2:941a59078507
--- a/MCP7490.cpp Fri Jun 19 15:33:03 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -#include "MCP7490.h" - - MCP7490::MCP7490(PinName sda, PinName scl){ - - } -MCP7490::MCP7490(){ - - } - - int MCP7490::getTime(){ - _Day = 1; - _Month = 1; - _Year = 2015; - _Hour = 0; - _Minutes = 1; - _Seconds = 1; - _MilliSeconds = 0; - return(0); - } - - int MCP7490::Day(){ - return(_Day); - } - int MCP7490::Month(){ - return(_Month); - } - int MCP7490::Year(){ - return(_Year); - } - int MCP7490::Hour(){ - return(_Hour); - } - - int MCP7490::Minutes(){ - return(_Minutes); - - } - int MCP7490::Seconds(){ - return(_Seconds); - } - int MCP7490::MilliSeconds(){ - return(_MilliSeconds); - }