diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-10-03 14:27:19 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-10-03 14:27:19 +0200 |
commit | 821efc46ec9392a58df95b396fd51972cf5fd3e7 (patch) | |
tree | b6810a45d5f5405ec9a24e82bb09a09485cfff37 /utils/atj2137/atjboottool/misc.h | |
parent | 8687b9899382b6008c66a89dbc01271437f7654d (diff) | |
download | rockbox-821efc46ec9392a58df95b396fd51972cf5fd3e7.tar.gz rockbox-821efc46ec9392a58df95b396fd51972cf5fd3e7.zip |
Introduce atjboottool for ATJ213x firmwares
Change-Id: Ie857b82e25de235c8549defab7e75995efefb3f6
Diffstat (limited to 'utils/atj2137/atjboottool/misc.h')
-rw-r--r-- | utils/atj2137/atjboottool/misc.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/utils/atj2137/atjboottool/misc.h b/utils/atj2137/atjboottool/misc.h new file mode 100644 index 0000000000..b0658c0d31 --- /dev/null +++ b/utils/atj2137/atjboottool/misc.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2010 Amaury Pouly | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef __MISC_H__ | ||
22 | #define __MISC_H__ | ||
23 | |||
24 | #include <stdbool.h> | ||
25 | |||
26 | #define _STR(a) #a | ||
27 | #define STR(a) _STR(a) | ||
28 | |||
29 | #define bug(...) do { fprintf(stderr,"["__FILE__":"STR(__LINE__)"]ERROR: "__VA_ARGS__); exit(1); } while(0) | ||
30 | #define bugp(...) do { fprintf(stderr, __VA_ARGS__); perror(" "); exit(1); } while(0) | ||
31 | |||
32 | #define ROUND_UP(val, round) ((((val) + (round) - 1) / (round)) * (round)) | ||
33 | |||
34 | typedef char color_t[]; | ||
35 | |||
36 | extern color_t OFF, GREY, RED, GREEN, YELLOW, BLUE; | ||
37 | void *xmalloc(size_t s); | ||
38 | void color(color_t c); | ||
39 | void enable_color(bool enable); | ||
40 | |||
41 | #endif /* __MISC_H__ */ | ||