1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22#ifndef _SPLASH_H_
23#define _SPLASH_H_
24
25#include <errno.h>
26
27enum splash_storage {
28 SPLASH_STORAGE_NAND,
29 SPLASH_STORAGE_SF,
30 SPLASH_STORAGE_MMC,
31 SPLASH_STORAGE_USB,
32 SPLASH_STORAGE_SATA,
33};
34
35enum splash_flags {
36 SPLASH_STORAGE_RAW,
37 SPLASH_STORAGE_FS,
38 SPLASH_STORAGE_FIT,
39};
40
41struct splash_location {
42 char *name;
43 enum splash_storage storage;
44 enum splash_flags flags;
45 u32 offset;
46 char *devpart;
47 char *mtdpart;
48 char *ubivol;
49};
50
51#ifdef CONFIG_SPLASH_SOURCE
52int splash_source_load(struct splash_location *locations, uint size);
53#else
54static inline int splash_source_load(struct splash_location *locations,
55 uint size)
56{
57 return 0;
58}
59#endif
60
61int splash_screen_prepare(void);
62
63#ifdef CONFIG_SPLASH_SCREEN_ALIGN
64void splash_get_pos(int *x, int *y);
65#else
66static inline void splash_get_pos(int *x, int *y) { }
67#endif
68
69#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP)
70int splash_display(void);
71#else
72static inline int splash_display(void)
73{
74 return -ENOSYS;
75}
76#endif
77
78#define BMP_ALIGN_CENTER 0x7FFF
79
80#endif
81