1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 by Dave Chapman
12 * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
14 * All files in this archive are subject to the GNU General Public License.
15 * See the file COPYING in the source tree root for full license agreement.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
37 #include "adc-target.h"
38 #include "backlight-target.h"
44 char version
[] = APPSVERSION
;
53 bool do_power_off
= false;
62 while(!do_power_off
) {
64 printf("Hello World!");
66 button
= button_read_device();
68 /* Power-off if POWER button has been held for a long time
69 This loop is currently running at about 100 iterations/second
71 if (button
& BUTTON_POWERPLAY
) {
73 if (power_count
> 200)
79 printf("Btn: 0x%08x",button
);
82 printf("Count: %d",count
);
95 /* These functions are present in the firmware library, but we reimplement
96 them here because the originals do a lot more than we want */
97 void usb_acknowledge(void)
101 void usb_wait_for_disconnect(void)