mpegplayer: make sure 'floating' videos are even-aligned on color displays or else...
[kugel-rb.git] / bootloader / common.h
blobc2690324e561c6bcb64ef77ef2900b736ad0907b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: main.c 11997 2007-01-13 09:08:18Z miipekk $
10 * Copyright (C) 2005 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 ****************************************************************************/
20 #include <stdbool.h>
22 /* 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 #define EINVALID_FORMAT -7
32 /* Set this to true to enable lcd_update() in the printf function */
33 extern bool verbose;
35 /* Error types */
36 #define EATA -1
37 #define EDISK -2
38 #define EBOOTFILE -3
40 /* Functions common to all bootloaders */
41 void reset_screen(void);
42 void printf(const char *format, ...);
43 char *strerror(int error);
44 void error(int errortype, int error);
45 int load_firmware(unsigned char* buf, char* firmware, int buffer_size);
46 int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size);