summaryrefslogtreecommitdiffstats
path: root/firmware/settings.h
blob: 29c87d04684bf4d5789c6e569c0b1d2f009e19d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/***************************************************************************
 *             __________               __   ___.
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
 *                     \/            \/     \/    \/            \/
 * $Id$
 *
 * Copyright (C) 2002 by wavey@wavey.org
 *
 * 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.
 *
 ****************************************************************************/

#ifndef __SETTINGS_H__
#define __SETTINGS_H__

/* data structures */

typedef enum 
{
    RESUME_NONE,       /* do not resume              */
    RESUME_SONG,       /* resume song at startup     */
    RESUME_PLAYLIST    /* resume playlist at startup */
} resume_t;

typedef struct
{
    /* audio settings */

    int volume;     /* audio output volume:  0-100 0=off   100=max           */
    int balance;    /* stereo balance:       0-100 0=left  50=bal 100=right  */
    int bass;       /* bass eq:              0-100 0=off   100=max           */
    int treble;     /* treble eq:            0-100 0=low   100=high          */
    int loudness;   /* loudness eq:          0-100 0=off   100=max           */
    int bass_boost; /* bass boost eq:        0-100 0=off   100=max           */

    /* device settings */

    int contrast;   /* lcd contrast:         0-100 0=low 100=high            */
    int poweroff;   /* power off timer:      0-100 0=never:each 1% = 60 secs */ 
    int backlight;  /* backlight off timer:  0-100 0=never:each 1% = 10 secs */

    /* resume settings */

    resume_t resume;   /* power-on song resume: 0=no. 1=yes song. 2=yes pl   */
    int track_time;    /* number of seconds into the track to resume         */

    /* misc options */

    int loop_playlist; /* do we return to top of playlist at end?            */

} user_settings_t;

/* prototypes */

int persist_all_settings( void );
void reload_all_settings( user_settings_t *settings );
void reset_settings( user_settings_t *settings );
void display_current_settings( user_settings_t *settings );

#endif /* __SETTINGS_H__ */