blob: adb833fd1d1baa39ab39d4facc9dca757ccbca2e [file] [log] [blame]
Barry Wardell84b509d2007-01-28 18:42:11 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: main.c 11997 2007-01-13 09:08:18Z miipekk $
9 *
10 * Copyright (C) 2005 by Linus Nielsen Feltzing
11 *
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.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
Dave Chapman582d02d2007-03-06 09:11:22 +000020#include <stdbool.h>
21
Barry Wardell84b509d2007-01-28 18:42:11 +000022/* Error codes */
23#define EOK 0
24#define EFILE_NOT_FOUND -1
25#define EREAD_CHKSUM_FAILED -2
26#define EREAD_MODEL_FAILED -3
27#define EREAD_IMAGE_FAILED -4
28#define EBAD_CHKSUM -5
29#define EFILE_TOO_BIG -6
30
Dave Chapman4d25bff2007-03-05 23:56:28 +000031/* Set this to true to enable lcd_update() in the printf function */
32extern bool verbose;
33
Barry Wardell84b509d2007-01-28 18:42:11 +000034/* Functions common to all bootloaders */
35void reset_screen(void);
36void printf(const char *format, ...);
37char *strerror(int error);
38int load_firmware(unsigned char* buf, char* firmware, int buffer_size);
39int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size);