Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
30 lines (22 sloc)
517 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /***** | |
| * S-RTC emulation code | |
| * Copyright (c) byuu | |
| *****/ | |
| #ifndef _SRTCEMU_H_ | |
| #define _SRTCEMU_H_ | |
| class SRTC { | |
| public: | |
| void update_time(); | |
| unsigned weekday(unsigned year, unsigned month, unsigned day); | |
| void init(); | |
| void enable(); | |
| void power(); | |
| void reset(); | |
| uint8 mmio_read (unsigned addr); | |
| void mmio_write(unsigned addr, uint8 data); | |
| SRTC(); | |
| static const unsigned months[12]; | |
| enum RTC_Mode { RTCM_Ready, RTCM_Command, RTCM_Read, RTCM_Write } rtc_mode; | |
| signed rtc_index; | |
| }; | |
| #endif |