summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/loader_strerror.h38
-rw-r--r--firmware/include/rb-loader.h22
2 files changed, 60 insertions, 0 deletions
diff --git a/firmware/include/loader_strerror.h b/firmware/include/loader_strerror.h
new file mode 100644
index 0000000000..e36036a8c0
--- /dev/null
+++ b/firmware/include/loader_strerror.h
@@ -0,0 +1,38 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2013 Marcin Bukat
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
18 *
19 ****************************************************************************/
20
21enum error_t {
22 EFILE_EMPTY = 0,
23 EFILE_NOT_FOUND = -1,
24 EREAD_CHKSUM_FAILED = -2,
25 EREAD_MODEL_FAILED = -3,
26 EREAD_IMAGE_FAILED = -4,
27 EBAD_CHKSUM = -5,
28 EFILE_TOO_BIG = -6,
29 EINVALID_FORMAT = -7,
30 EKEY_NOT_FOUND = -8,
31 EDECRYPT_FAILED = -9,
32 EREAD_HEADER_FAILED = -10,
33 EBAD_HEADER_CHKSUM = -11,
34 EINVALID_LOAD_ADDR = -12,
35 EBAD_MODEL = -13
36};
37
38char *loader_strerror(enum error_t error);
diff --git a/firmware/include/rb-loader.h b/firmware/include/rb-loader.h
new file mode 100644
index 0000000000..e1e756dba9
--- /dev/null
+++ b/firmware/include/rb-loader.h
@@ -0,0 +1,22 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2005 by Linus Nielsen Feltzing
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 1
14 * of the License, or (at your option) any later version.
15 *
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
18 *
19 ****************************************************************************/
20
21const char *rb_strerror(int8_t errno);
22int load_firmware(unsigned char* buf, const char* firmware, int buffer_size);