1
0
Fork 0
forked from len0rd/rockbox

Split the HAVE_RTC define into HAVE_RTC, HAVE_RTC_RAM and CONFIG_RTC - in preparation for targets (H300, iPod) which have a clock (HAVE_RTC) but no general purpose RAM available for settings data (HAVE_RTC_RAM). CONFIG_RTC is used to specify the low-level driver required.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8144 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2005-12-04 13:05:56 +00:00
parent 11b2ade5c8
commit 5009c9c1b8
9 changed files with 38 additions and 5 deletions

View file

@ -574,7 +574,7 @@ static void init_config_buffer( void )
static int save_config_buffer( void )
{
unsigned short chksum;
#ifdef HAVE_RTC
#ifdef HAVE_RTC_RAM
unsigned int i;
#endif
@ -583,7 +583,7 @@ static int save_config_buffer( void )
config_block[ RTC_BLOCK_SIZE - 2 ] = chksum >> 8;
config_block[ RTC_BLOCK_SIZE - 1 ] = chksum & 0xff;
#ifdef HAVE_RTC
#ifdef HAVE_RTC_RAM
/* FIXME: okay, it _would_ be cleaner and faster to implement rtc_write so
that it would write a number of bytes at a time since the RTC chip
supports that, but this will have to do for now 8-) */
@ -637,7 +637,7 @@ static int load_config_buffer(int which)
}
}
#ifdef HAVE_RTC
#ifdef HAVE_RTC_RAM
if(!correct)
{
/* If the disk sector was incorrect, reinit the buffer */