1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
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 ****************************************************************************/
27 #include "mp3_playback.h"
31 #include "statusbar.h"
33 #include "timefuncs.h"
35 #ifdef HAVE_LCD_BITMAP
39 #include "powermgmt.h"
42 #if CONFIG_KEYPAD == IRIVER_H100_PAD
50 enum playmode ff_mode
;
53 bool battery_state
= true;
55 int battery_charge_step
= 0;
58 void status_init(void)
63 void status_set_ffmode(enum playmode mode
)
65 ff_mode
= mode
; /* Either STATUS_FASTFORWARD or STATUS_FASTBACKWARD */
68 enum playmode
status_get_ffmode(void)
70 /* only use this function for STATUS_FASTFORWARD or STATUS_FASTBACKWARD */
71 /* use audio_status() for other modes */
75 int current_playmode(void)
77 int audio_stat
= audio_status();
79 /* ff_mode can be either STATUS_FASTFORWARD or STATUS_FASTBACKWARD
80 and that supercedes the other modes */
84 if(audio_stat
& AUDIO_STATUS_PLAY
)
86 if(audio_stat
& AUDIO_STATUS_PAUSE
)
91 #if CONFIG_CODEC == MAS3587F
94 if(audio_stat
& AUDIO_STATUS_RECORD
)
96 if(audio_stat
& AUDIO_STATUS_PAUSE
)
97 return STATUS_RECORD_PAUSE
;
105 audio_stat
= get_radio_status();
107 if(audio_stat
== FMRADIO_PLAYING
)
110 if(audio_stat
== FMRADIO_PAUSED
)
111 return STATUS_RADIO_PAUSE
;
117 #if defined(HAVE_LCD_CHARCELLS)
123 void status_set_record(bool b
)
128 void status_set_audio(bool b
)
133 void status_set_param(bool b
)
138 void status_set_usb(bool b
)
143 #endif /* HAVE_LCD_CHARCELLS */