1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by wavey@wavey.org
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef __SETTINGS_H__
21 #define __SETTINGS_H__
36 int volume
; /* audio output volume: 0-100 0=off 100=max */
37 int balance
; /* stereo balance: 0-100 0=left 50=bal 100=right */
38 int bass
; /* bass eq: 0-100 0=off 100=max */
39 int treble
; /* treble eq: 0-100 0=low 100=high */
40 int loudness
; /* loudness eq: 0-100 0=off 100=max */
41 int bass_boost
; /* bass boost eq: 0-100 0=off 100=max */
42 int avc
; /* auto volume correct: 0=disable, 1=2s 2=4s 3=8s */
46 int contrast
; /* lcd contrast: 0-100 0=low 100=high */
47 int poweroff
; /* power off timer: 0-100 0=never:each 1% = 60 secs */
48 int backlight
; /* backlight off timer: 0-100 0=never:each 1% = 10 secs */
49 bool discharge
; /* maintain charge of at least: false = 90%, true = 10% */
53 int resume
; /* resume option: 0=off, 1=ask, 2=on */
54 int resume_index
; /* index in playlist (-1 for no active resume) */
55 int resume_offset
; /* byte offset in mp3 file */
56 int resume_seed
; /* random seed for playlist shuffle */
57 unsigned char resume_file
[MAX_PATH
+1]; /* playlist name (or dir) */
61 int loop_playlist
; /* do we return to top of playlist at end? */
62 bool mp3filter
; /* only display mp3/m3u files and dirs in directory? */
63 bool sort_case
; /* dir sort order: 0=case insensitive, 1=sensitive */
64 int scroll_speed
; /* long texts scrolling speed: 1-20 */
65 bool playlist_shuffle
;
66 int ff_rewind_accel
; /* FF/Rewind acceleration (in seconds per doubling) */
67 int disk_spindown
; /* time until disk spindown, in seconds (0=off) */
69 /* while playing screen settings */
70 int wps_display
; /* 0=id3, 1=file, 2=parse */
73 bool statusbar
; /* 0=hide, 1=show */
75 /* Hidden and dotfile settings */
76 bool show_hidden_files
; /* 1=show dotfiles/hidden,
77 0=hide dotfiles/hidden */
79 /* geeky persistent statistics */
80 unsigned int total_uptime
; /* total uptime since rockbox was first booted */
85 int settings_save(void);
86 void settings_load(void);
87 void settings_reset(void);
88 void settings_display(void);
90 void set_bool(char* string
, bool* variable
);
91 void set_option(char* string
, int* variable
, char* options
[], int numoptions
);
92 void set_int(char* string
,
95 void (*function
)(int),
99 void set_time(char* string
, int timedate
[]);
101 /* global settings */
102 extern struct user_settings global_settings
;
103 /* name of directory where configuration, fonts and other data
104 * files are stored */
105 extern char rockboxdir
[];
109 #ifdef HAVE_LCD_CHARCELLS
110 #define MAX_CONTRAST_SETTING 31
111 #define DEFAULT_CONTRAST_SETTING 30
113 #define MAX_CONTRAST_SETTING 63
114 #define DEFAULT_CONTRAST_SETTING 32
116 #define MIN_CONTRAST_SETTING 5
117 #define DEFAULT_POWEROFF_SETTING 0
118 #define DEFAULT_BACKLIGHT_SETTING 5
119 #define DEFAULT_WPS_DISPLAY 0
120 #define DEFAULT_FF_REWIND_ACCEL_SETTING 3
122 #endif /* __SETTINGS_H__ */