/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * $Id$ * * Copyright (C) 2002 by wavey@wavey.org * RTC config saving code (C) 2002 by hessu@hes.iki.fi * * All files in this archive are subject to the GNU General Public License. * See the file COPYING in the source tree root for full license agreement. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************/ #include #include "config.h" #include "kernel.h" #include "settings.h" #include "disk.h" #include "panic.h" #include "debug.h" #include "button.h" #include "lcd.h" #include "mpeg.h" #include "string.h" #include "ata.h" #include "fat.h" #include "power.h" #include "backlight.h" #include "powermgmt.h" #include "status.h" #ifdef HAVE_LCD_BITMAP #include "icons.h" #endif struct user_settings global_settings; char rockboxdir[] = "/.rockbox/"; /* config/font/data file directory */ #define CONFIG_BLOCK_VERSION 1 #define CONFIG_BLOCK_SIZE 512 #define RTC_BLOCK_SIZE 44 /******************************************** Config block as saved on the battery-packed RTC user RAM memory block of 44 bytes, starting at offset 0x14 of the RTC memory space. offset abs 0x00 0x14 "Roc" header signature: 0x52 0x6f 0x63 0x03 0x17 0x04 0x18 0x05 0x19 0x06 0x1a 0x07 0x1b 0x08 0x1c 0x09 0x1d 0x0a 0x1e 0x0b 0x1f 0x0c 0x20 0x0d 0x21 0x0e 0x22 0x0f 0x23 0x10 0x24 0x11 0x25 0x12 0x26 <(int) Resume playlist index, or -1 if no playlist resume> 0x16 0x2a <(int) Byte offset into resume file> 0x1a 0x2e