Difference between revisions of "Modules/clock"

From MSX Game Library

< Modules

(Settings)
Line 9: Line 9:
  
 
== Settings ==
 
== Settings ==
 +
Library configuration (<tt>msx_config.h</tt>):
 +
#define RTC_USE_CLOCK TRUE // Add functions to handle date and time
 +
#define RTC_USE_CLOCK_EXTRA TRUE // Add extra date and time functions that require additional data
 +
#define RTC_USE_SAVEDATA TRUE // Add functions to read/write into the CMOS
 +
#define RTC_USE_SAVESIGNED TRUE // Add signature handling to validate CMOS I/O
  
 
== Usage ==
 
== Usage ==

Revision as of 00:03, 26 December 2023

The clock module allow to use MSX2 Real-time Clock (RTC) features including date and time handle, but also save or load data from the embedded non-volatile RAM (CMOS).

The MSX 2 real-time clock is a Ricoh RP-5C01. For more information about this device:

Dependencies

  • None

Settings

Library configuration (msx_config.h):

#define RTC_USE_CLOCK				TRUE	// Add functions to handle date and time
#define RTC_USE_CLOCK_EXTRA			TRUE	// Add extra date and time functions that require additional data
#define RTC_USE_SAVEDATA			TRUE	// Add functions to read/write into the CMOS 
#define RTC_USE_SAVESIGNED			TRUE	// Add signature handling to validate CMOS I/O

Usage

Annexe

Documentation