Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ICE-Application/src/Drivers/rtc.h
- Committer:
- jmarkel44
- Date:
- 2017-01-24
- Revision:
- 1:b2e90cda7a5a
- Parent:
- 0:61364762ee0e
File content as of revision 1:b2e90cda7a5a:
#ifndef _RTC_H_ #define _RTC_H_ // ------------------------------------------------------------------------------------------------- // globals #define RTC_ADDR 0xD0 // address byte: 0b11010000(R/W) -> DS1339 #define RTC_SIZE_ADDR 1 #define RTC_SIZE_DATA 7 #define RTC_SIZE_CONTROL 1 #define RTC_SIZE_STAUS 1 #define RTC_SECONDS_ADDR 0x0 #define RTC_MINUTES_ADDR 0x1 #define RTC_HOURS_ADDR 0x2 #define RTC_DOW_ADDR 0x3 #define RTC_MDAY_ADDR 0x4 #define RTC_MONTH_ADDR 0x5 #define RTC_YEAR_ADDR 0x6 #define RTC_CONTROL_ADDR 0xE #define RTC_STATUS_ADDR 0xF #define RTC_TRICKLE_ADDR 0x10 extern int rtc_verbose; // ------------------------------------------------------------------------------------------------- // function prototypes void rtc_init(void); void rtc_regs(void); void rtc_print(void); void rtc_get_time(int* iyr, int* imo, int* idy, int* ihr, int* imn, int* isc); void rtc_set_time(int iyr, int imo, int idy, int ihr, int imn, int isc); void rtc_set(const char* s); // ------------------------------------------------------------------------------------------------- #endif // _RTC_H_