mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -05:00
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
This commit is contained in:
parent
0ea71be348
commit
8c800cf59a
27 changed files with 48 additions and 62 deletions
|
|
@ -23,7 +23,7 @@ bool debug_menu(void);
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
extern bool dbg_ports(void);
|
extern bool dbg_ports(void);
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
extern bool dbg_rtc(void);
|
extern bool dbg_rtc(void);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -112,9 +112,9 @@ void gui_statusbar_init(struct gui_statusbar * bar)
|
||||||
void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
|
void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
|
||||||
{
|
{
|
||||||
struct screen * display = bar->display;
|
struct screen * display = bar->display;
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
struct tm* tm; /* For Time */
|
struct tm* tm; /* For Time */
|
||||||
#endif /* HAVE_RTC */
|
#endif /* CONFIG_RTC */
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
(void)force_redraw; /* players always "redraw" */
|
(void)force_redraw; /* players always "redraw" */
|
||||||
|
|
@ -126,11 +126,11 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
|
||||||
bar->info.battery_safe = battery_level_safe();
|
bar->info.battery_safe = battery_level_safe();
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
tm = get_time();
|
tm = get_time();
|
||||||
bar->info.hour = tm->tm_hour;
|
bar->info.hour = tm->tm_hour;
|
||||||
bar->info.minute = tm->tm_min;
|
bar->info.minute = tm->tm_min;
|
||||||
#endif /* HAVE_RTC */
|
#endif /* CONFIG_RTC */
|
||||||
|
|
||||||
bar->info.shuffle = global_settings.playlist_shuffle;
|
bar->info.shuffle = global_settings.playlist_shuffle;
|
||||||
#ifdef HAS_BUTTON_HOLD
|
#ifdef HAS_BUTTON_HOLD
|
||||||
|
|
@ -257,9 +257,9 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
|
||||||
if (bar->info.keylockremote)
|
if (bar->info.keylockremote)
|
||||||
gui_statusbar_icon_lock_remote(display);
|
gui_statusbar_icon_lock_remote(display);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
gui_statusbar_time(display, bar->info.hour, bar->info.minute);
|
gui_statusbar_time(display, bar->info.hour, bar->info.minute);
|
||||||
#endif /* HAVE_RTC */
|
#endif /* CONFIG_RTC */
|
||||||
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
|
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
|
||||||
if(!display->has_disk_led && bar->info.led)
|
if(!display->has_disk_led && bar->info.led)
|
||||||
gui_statusbar_led(display);
|
gui_statusbar_led(display);
|
||||||
|
|
@ -482,7 +482,7 @@ void gui_statusbar_led(struct screen * display)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
/*
|
/*
|
||||||
* Print time to status bar
|
* Print time to status bar
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
struct status_info {
|
struct status_info {
|
||||||
int battlevel;
|
int battlevel;
|
||||||
int volume;
|
int volume;
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
int hour;
|
int hour;
|
||||||
int minute;
|
int minute;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -111,7 +111,7 @@ void gui_statusbar_icon_lock_remote(struct screen * display);
|
||||||
void gui_statusbar_led(struct screen * display);
|
void gui_statusbar_led(struct screen * display);
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
void gui_statusbar_time(struct screen * display, int hour, int minute);
|
void gui_statusbar_time(struct screen * display, int hour, int minute);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ void init(void)
|
||||||
|
|
||||||
i2c_init();
|
i2c_init();
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
rtc_init();
|
rtc_init();
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_RTC_RAM
|
#ifdef HAVE_RTC_RAM
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ bool show_info(void)
|
||||||
output_dyn_value(NULL, 0, free, kbyte_units, true); /* NULL == talk */
|
output_dyn_value(NULL, 0, free, kbyte_units, true); /* NULL == talk */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
{
|
{
|
||||||
struct tm* tm = get_time();
|
struct tm* tm = get_time();
|
||||||
talk_id(VOICE_CURRENT_TIME, true);
|
talk_id(VOICE_CURRENT_TIME, true);
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ char *create_numbered_filename(char *buffer, const char *path,
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
/* Create a filename with a date+time part.
|
/* Create a filename with a date+time part.
|
||||||
It is allowed that buffer and path point to the same memory location,
|
It is allowed that buffer and path point to the same memory location,
|
||||||
saving a strcpy(). Path must always be given without trailing slash. */
|
saving a strcpy(). Path must always be given without trailing slash. */
|
||||||
|
|
@ -175,7 +175,7 @@ char *create_datetime_filename(char *buffer, const char *path,
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_RTC */
|
#endif /* CONFIG_RTC */
|
||||||
|
|
||||||
/* Read (up to) a line of text from fd into buffer and return number of bytes
|
/* Read (up to) a line of text from fd into buffer and return number of bytes
|
||||||
* read (which may be larger than the number of bytes stored in buffer). If
|
* read (which may be larger than the number of bytes stored in buffer). If
|
||||||
|
|
@ -300,7 +300,7 @@ void screen_dump(void)
|
||||||
static unsigned short line_block[BMP_LINESIZE/2];
|
static unsigned short line_block[BMP_LINESIZE/2];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
create_datetime_filename(filename, "", "dump ", ".bmp");
|
create_datetime_filename(filename, "", "dump ", ".bmp");
|
||||||
#else
|
#else
|
||||||
create_numbered_filename(filename, "", "dump_", ".bmp", 4);
|
create_numbered_filename(filename, "", "dump_", ".bmp", 4);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ void output_dyn_value(char *buf, int buf_size, int value,
|
||||||
char *create_numbered_filename(char *buffer, const char *path,
|
char *create_numbered_filename(char *buffer, const char *path,
|
||||||
const char *prefix, const char *suffix,
|
const char *prefix, const char *suffix,
|
||||||
int numberlen);
|
int numberlen);
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
char *create_datetime_filename(char *buffer, const char *path,
|
char *create_datetime_filename(char *buffer, const char *path,
|
||||||
const char *prefix, const char *suffix);
|
const char *prefix, const char *suffix);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,10 @@ video.c
|
||||||
#endif
|
#endif
|
||||||
vu_meter.c
|
vu_meter.c
|
||||||
|
|
||||||
#ifdef HAVE_RTC /* Recorder models only */
|
#ifdef CONFIG_RTC /* Recorder models only */
|
||||||
calendar.c
|
calendar.c
|
||||||
clock.c
|
clock.c
|
||||||
#endif /* #ifdef HAVE_RTC */
|
#endif /* #ifdef CONFIG_RTC */
|
||||||
|
|
||||||
#if CONFIG_KEYPAD != ONDIO_PAD
|
#if CONFIG_KEYPAD != ONDIO_PAD
|
||||||
/* gradually bring in the ones not working yet */
|
/* gradually bring in the ones not working yet */
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ enum plugin_status loop(void)
|
||||||
rb->splash(HZ, true, "Failed creating /battery.log");
|
rb->splash(HZ, true, "Failed creating /battery.log");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
t = rb->get_time();
|
t = rb->get_time();
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ struct counter values[]={
|
||||||
{"ydist", -6},
|
{"ydist", -6},
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
static unsigned char yminute[]={
|
static unsigned char yminute[]={
|
||||||
53,53,52,52,51,50,49,47,46,44,42,40,38,36,34,32,29,27,25,23,21,19,17,16,14,13,12,11,11,10,10,10,11,11,12,13,14,16,17,19,21,23,25,27,29,31,34,36,38,40,42,44,46,47,49,50,51,52,52,53,
|
53,53,52,52,51,50,49,47,46,44,42,40,38,36,34,32,29,27,25,23,21,19,17,16,14,13,12,11,11,10,10,10,11,11,12,13,14,16,17,19,21,23,25,27,29,31,34,36,38,40,42,44,46,47,49,50,51,52,52,53,
|
||||||
};
|
};
|
||||||
|
|
@ -277,7 +277,7 @@ static void addclock(void)
|
||||||
yminute[(i+1)%60]);
|
yminute[(i+1)%60]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* HAVE_RTC */
|
#endif /* CONFIG_RTC */
|
||||||
|
|
||||||
#define DRAW_WIDTH (LCD_WIDTH + LETTER_WIDTH*2)
|
#define DRAW_WIDTH (LCD_WIDTH + LETTER_WIDTH*2)
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ static int scrollit(void)
|
||||||
yy += YADD;
|
yy += YADD;
|
||||||
xx+= DRAW_WIDTH/LETTERS_ON_SCREEN;
|
xx+= DRAW_WIDTH/LETTERS_ON_SCREEN;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
addclock();
|
addclock();
|
||||||
#endif
|
#endif
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
@ -385,7 +385,7 @@ static int loopit(void)
|
||||||
x+= speed[xsanke&15] + values[NUM_XADD].num;
|
x+= speed[xsanke&15] + values[NUM_XADD].num;
|
||||||
|
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
addclock();
|
addclock();
|
||||||
#endif
|
#endif
|
||||||
if(timeout) {
|
if(timeout) {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
|
|
||||||
#if defined(HAVE_LCD_BITMAP) && defined(HAVE_RTC)
|
#if defined(HAVE_LCD_BITMAP) && defined(CONFIG_RTC)
|
||||||
|
|
||||||
#include <timefuncs.h>
|
#include <timefuncs.h>
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ static int calc_weekday( struct shown *shown )
|
||||||
static void calendar_init(struct today *today, struct shown *shown)
|
static void calendar_init(struct today *today, struct shown *shown)
|
||||||
{
|
{
|
||||||
int w,h;
|
int w,h;
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
#else
|
#else
|
||||||
(void)today;
|
(void)today;
|
||||||
|
|
@ -81,7 +81,7 @@ static void calendar_init(struct today *today, struct shown *shown)
|
||||||
use_system_font = true;
|
use_system_font = true;
|
||||||
}
|
}
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
tm = rb->get_time();
|
tm = rb->get_time();
|
||||||
today->mon = tm->tm_mon +1;
|
today->mon = tm->tm_mon +1;
|
||||||
today->year = 2000+tm->tm_year%100;
|
today->year = 2000+tm->tm_year%100;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ Original release, featuring analog / digital modes and a few options.
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
|
|
||||||
#if defined(HAVE_LCD_BITMAP) && defined(HAVE_RTC)
|
#if defined(HAVE_LCD_BITMAP) && defined(CONFIG_RTC)
|
||||||
|
|
||||||
#define CLOCK_VERSION "2.60"
|
#define CLOCK_VERSION "2.60"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ extern void statusbar_icon_play_state(int state);
|
||||||
extern void statusbar_icon_play_mode(int mode);
|
extern void statusbar_icon_play_mode(int mode);
|
||||||
extern void statusbar_icon_shuffle(void);
|
extern void statusbar_icon_shuffle(void);
|
||||||
extern void statusbar_icon_lock(void);
|
extern void statusbar_icon_lock(void);
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
extern void statusbar_time(int hour, int minute);
|
extern void statusbar_time(int hour, int minute);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_LED == LED_VIRTUAL
|
#if CONFIG_LED == LED_VIRTUAL
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ char *rec_create_filename(char *buffer)
|
||||||
else
|
else
|
||||||
strncpy(buffer, rec_base_directory, MAX_PATH);
|
strncpy(buffer, rec_base_directory, MAX_PATH);
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
create_datetime_filename(buffer, buffer, "R", REC_FILE_ENDING);
|
create_datetime_filename(buffer, buffer, "R", REC_FILE_ENDING);
|
||||||
#else
|
#else
|
||||||
create_numbered_filename(buffer, buffer, "rec_", REC_FILE_ENDING, 4);
|
create_numbered_filename(buffer, buffer, "rec_", REC_FILE_ENDING, 4);
|
||||||
|
|
|
||||||
|
|
@ -624,7 +624,7 @@ void charging_splash(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC)
|
#if defined(HAVE_LCD_BITMAP) && defined (CONFIG_RTC)
|
||||||
|
|
||||||
/* little helper function for voice output */
|
/* little helper function for voice output */
|
||||||
static void say_time(int cursorpos, const struct tm *tm)
|
static void say_time(int cursorpos, const struct tm *tm)
|
||||||
|
|
@ -923,7 +923,7 @@ bool set_time_screen(const char* string, struct tm *tm)
|
||||||
lcd_set_drawmode(lastmode);
|
lcd_set_drawmode(lastmode);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif /* defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC) */
|
#endif /* defined(HAVE_LCD_BITMAP) && defined (CONFIG_RTC) */
|
||||||
|
|
||||||
#if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
|
#if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
|
||||||
bool shutdown_screen(void)
|
bool shutdown_screen(void)
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ extern bool quick_screen_f3(int button_enter);
|
||||||
#endif
|
#endif
|
||||||
extern bool quick_screen_quick(int button_enter);
|
extern bool quick_screen_quick(int button_enter);
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
bool set_time_screen(const char* string, struct tm *tm);
|
bool set_time_screen(const char* string, struct tm *tm);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -829,7 +829,7 @@ static bool battery_type(void)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
static bool timedate_set(void)
|
static bool timedate_set(void)
|
||||||
{
|
{
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
|
|
@ -1682,7 +1682,7 @@ static bool disk_settings_menu(void)
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_MMC */
|
#endif /* !HAVE_MMC */
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
static bool time_settings_menu(void)
|
static bool time_settings_menu(void)
|
||||||
{
|
{
|
||||||
int m;
|
int m;
|
||||||
|
|
@ -1748,7 +1748,7 @@ static bool system_settings_menu(void)
|
||||||
#ifndef HAVE_MMC
|
#ifndef HAVE_MMC
|
||||||
{ ID2P(LANG_DISK_MENU), disk_settings_menu },
|
{ ID2P(LANG_DISK_MENU), disk_settings_menu },
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
{ ID2P(LANG_TIME_MENU), time_settings_menu },
|
{ ID2P(LANG_TIME_MENU), time_settings_menu },
|
||||||
#endif
|
#endif
|
||||||
{ ID2P(LANG_POWEROFF_IDLE), poweroff_idle_timer },
|
{ ID2P(LANG_POWEROFF_IDLE), poweroff_idle_timer },
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include "gwps.h"
|
#include "gwps.h"
|
||||||
#include "abrepeat.h"
|
#include "abrepeat.h"
|
||||||
#include "statusbar.h"
|
#include "statusbar.h"
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
#include "timefuncs.h"
|
#include "timefuncs.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
|
||||||
|
|
@ -97,11 +97,9 @@ drivers/mas.c
|
||||||
#ifdef IRIVER_H300_SERIES
|
#ifdef IRIVER_H300_SERIES
|
||||||
drivers/pcf50606.c
|
drivers/pcf50606.c
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_RTC
|
|
||||||
#if CONFIG_RTC == RTC_M41ST84W
|
#if CONFIG_RTC == RTC_M41ST84W
|
||||||
drivers/rtc.c
|
drivers/rtc.c
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
drivers/serial.c
|
drivers/serial.c
|
||||||
#endif /* !SIMULATOR */
|
#endif /* !SIMULATOR */
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ bool valid_time(const struct tm *tm)
|
||||||
struct tm *get_time(void)
|
struct tm *get_time(void)
|
||||||
{
|
{
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
char rtcbuf[8];
|
char rtcbuf[8];
|
||||||
|
|
||||||
/* We don't need the first byte, but we want the indexes in the
|
/* 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)
|
int set_time(const struct tm *tm)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
int rc;
|
int rc;
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1010,7 +1010,7 @@ static void fat_time(unsigned short* date,
|
||||||
unsigned short* time,
|
unsigned short* time,
|
||||||
unsigned short* tenth )
|
unsigned short* tenth )
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
struct tm* tm = get_time();
|
struct tm* tm = get_time();
|
||||||
|
|
||||||
if (date)
|
if (date)
|
||||||
|
|
@ -1092,7 +1092,7 @@ static void fat_time(unsigned short* date,
|
||||||
}
|
}
|
||||||
if (tenth)
|
if (tenth)
|
||||||
*tenth = 0;
|
*tenth = 0;
|
||||||
#endif /* HAVE_RTC */
|
#endif /* CONFIG_RTC */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int write_long_name(struct fat_file* file,
|
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);
|
*sizeptr = htole32(size);
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
unsigned short time = 0;
|
unsigned short time = 0;
|
||||||
unsigned short date = 0;
|
unsigned short date = 0;
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,11 @@
|
||||||
#define CONFIG_KEYPAD RECORDER_PAD
|
#define CONFIG_KEYPAD RECORDER_PAD
|
||||||
|
|
||||||
/* define this if you have a real-time clock */
|
/* 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 this if you have RTC RAM available for settings */
|
||||||
#define HAVE_RTC_RAM 1
|
#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 this if you have a software controlled poweroff */
|
||||||
#define HAVE_SW_POWEROFF
|
#define HAVE_SW_POWEROFF
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,11 @@
|
||||||
#define HAVE_LCD_BITMAP 1
|
#define HAVE_LCD_BITMAP 1
|
||||||
|
|
||||||
/* define this if you have a real-time clock */
|
/* 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 this if you have RTC RAM available for settings */
|
||||||
#define HAVE_RTC_RAM 1
|
#define HAVE_RTC_RAM 1
|
||||||
|
|
||||||
/* define this to the type of RTC hardware */
|
|
||||||
#define CONFIG_RTC RTC_M41ST84W
|
|
||||||
|
|
||||||
/* LCD dimensions */
|
/* LCD dimensions */
|
||||||
#define LCD_WIDTH 128
|
#define LCD_WIDTH 128
|
||||||
#define LCD_HEIGHT 64
|
#define LCD_HEIGHT 64
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,11 @@
|
||||||
#define CONFIG_KEYPAD RECORDER_PAD
|
#define CONFIG_KEYPAD RECORDER_PAD
|
||||||
|
|
||||||
/* define this if you have a real-time clock */
|
/* 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 this if you have RTC RAM available for settings */
|
||||||
#define HAVE_RTC_RAM 1
|
#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 */
|
/* The number of bytes reserved for loadable plugins */
|
||||||
#define PLUGIN_BUFFER_SIZE 0x8000
|
#define PLUGIN_BUFFER_SIZE 0x8000
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,11 @@
|
||||||
#define CONFIG_KEYPAD RECORDER_PAD
|
#define CONFIG_KEYPAD RECORDER_PAD
|
||||||
|
|
||||||
/* define this if you have a real-time clock */
|
/* 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 this if you have RTC RAM available for settings */
|
||||||
#define HAVE_RTC_RAM 1
|
#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 this if you have a software controlled poweroff */
|
||||||
#define HAVE_SW_POWEROFF
|
#define HAVE_SW_POWEROFF
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef HAVE_RTC
|
#ifdef CONFIG_RTC
|
||||||
void rtc_init(void);
|
void rtc_init(void);
|
||||||
int rtc_read(unsigned char address);
|
int rtc_read(unsigned char address);
|
||||||
int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes);
|
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);
|
bool rtc_check_alarm_flag(void);
|
||||||
#endif /* HAVE_ALARM_MOD */
|
#endif /* HAVE_ALARM_MOD */
|
||||||
|
|
||||||
#endif /* HAVE_RTC */
|
#endif /* CONFIG_RTC */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue