summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-12-04 15:23:47 +0000
committerDave Chapman <dave@dchapman.com>2005-12-04 15:23:47 +0000
commit8c800cf59af23eaa22b97e89556640f63998b9bd (patch)
tree96115da5d0597b7625c637158364866d365258e1 /firmware
parent0ea71be34895a225e137af20faea2adc9f113853 (diff)
Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC defines from config-*.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/common/timefuncs.c4
-rw-r--r--firmware/drivers/fat.c6
-rw-r--r--firmware/drivers/rtc.c2
-rw-r--r--firmware/export/config-fmrecorder.h5
-rw-r--r--firmware/export/config-gmini120.h5
-rw-r--r--firmware/export/config-recorder.h5
-rw-r--r--firmware/export/config-recorderv2.h5
-rw-r--r--firmware/export/rtc.h4
9 files changed, 12 insertions, 26 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 086501cc30..e2e0e44e5d 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -97,11 +97,9 @@ drivers/mas.c
#ifdef IRIVER_H300_SERIES
drivers/pcf50606.c
#endif
-#ifdef HAVE_RTC
#if CONFIG_RTC == RTC_M41ST84W
drivers/rtc.c
#endif
-#endif
drivers/serial.c
#endif /* !SIMULATOR */
#ifdef HAVE_LCD_BITMAP
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index 1a256cc05e..c40ff2880c 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -46,7 +46,7 @@ bool valid_time(const struct tm *tm)
struct tm *get_time(void)
{
#ifndef SIMULATOR
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
char rtcbuf[8];
/* We don't need the first byte, but we want the indexes in the
@@ -84,7 +84,7 @@ struct tm *get_time(void)
int set_time(const struct tm *tm)
{
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
int rc;
int tmp;
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 758e48cdbd..fd09bff0da 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -1010,7 +1010,7 @@ static void fat_time(unsigned short* date,
unsigned short* time,
unsigned short* tenth )
{
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
struct tm* tm = get_time();
if (date)
@@ -1092,7 +1092,7 @@ static void fat_time(unsigned short* date,
}
if (tenth)
*tenth = 0;
-#endif /* HAVE_RTC */
+#endif /* CONFIG_RTC */
}
static int write_long_name(struct fat_file* file,
@@ -1529,7 +1529,7 @@ static int update_short_entry( struct fat_file* file, long size, int attr )
*sizeptr = htole32(size);
{
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
unsigned short time = 0;
unsigned short date = 0;
#else
diff --git a/firmware/drivers/rtc.c b/firmware/drivers/rtc.c
index 0e65a8be5b..30bbb6dfcb 100644
--- a/firmware/drivers/rtc.c
+++ b/firmware/drivers/rtc.c
@@ -17,7 +17,7 @@
*
****************************************************************************/
#include "config.h"
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
#include "i2c.h"
#include "rtc.h"
#include "kernel.h"
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index 221472a179..a96da0a352 100644
--- a/firmware/export/config-fmrecorder.h
+++ b/firmware/export/config-fmrecorder.h
@@ -13,14 +13,11 @@
#define CONFIG_KEYPAD RECORDER_PAD
/* define this if you have a real-time clock */
-#define HAVE_RTC 1
+#define CONFIG_RTC RTC_M41ST84W
/* define this if you have RTC RAM available for settings */
#define HAVE_RTC_RAM 1
-/* define this to the type of RTC hardware */
-#define CONFIG_RTC RTC_M41ST84W
-
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF
diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h
index a7566649b5..29066ecae3 100644
--- a/firmware/export/config-gmini120.h
+++ b/firmware/export/config-gmini120.h
@@ -8,14 +8,11 @@
#define HAVE_LCD_BITMAP 1
/* define this if you have a real-time clock */
-#define HAVE_RTC 1
+#define CONFIG_RTC RTC_M41ST84W
/* define this if you have RTC RAM available for settings */
#define HAVE_RTC_RAM 1
-/* define this to the type of RTC hardware */
-#define CONFIG_RTC RTC_M41ST84W
-
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index 97062c168c..fee2b2a2e0 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -13,14 +13,11 @@
#define CONFIG_KEYPAD RECORDER_PAD
/* define this if you have a real-time clock */
-#define HAVE_RTC 1
+#define CONFIG_RTC RTC_M41ST84W
/* define this if you have RTC RAM available for settings */
#define HAVE_RTC_RAM 1
-/* define this to the type of RTC hardware */
-#define CONFIG_RTC RTC_M41ST84W
-
/* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x8000
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h
index 21fe0b20c2..dd0f550626 100644
--- a/firmware/export/config-recorderv2.h
+++ b/firmware/export/config-recorderv2.h
@@ -13,14 +13,11 @@
#define CONFIG_KEYPAD RECORDER_PAD
/* define this if you have a real-time clock */
-#define HAVE_RTC 1
+#define CONFIG_RTC RTC_M41ST84W
/* define this if you have RTC RAM available for settings */
#define HAVE_RTC_RAM 1
-/* define this to the type of RTC hardware */
-#define CONFIG_RTC RTC_M41ST84W
-
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF
diff --git a/firmware/export/rtc.h b/firmware/export/rtc.h
index fd793bc887..88413c795f 100644
--- a/firmware/export/rtc.h
+++ b/firmware/export/rtc.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
void rtc_init(void);
int rtc_read(unsigned char address);
int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes);
@@ -35,6 +35,6 @@ bool rtc_check_alarm_started(bool release_alarm);
bool rtc_check_alarm_flag(void);
#endif /* HAVE_ALARM_MOD */
-#endif /* HAVE_RTC */
+#endif /* CONFIG_RTC */
#endif