forked from tano-systems/psplash-tn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
psplash.h
97 lines (82 loc) · 2.11 KB
/
psplash.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* pslash - a lightweight framebuffer splashscreen for embedded devices.
*
* Copyright (c) 2006 Matthew Allum <mallum@o-hand.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _HAVE_PSPLASH_H
#define _HAVE_PSPLASH_H
#define _GNU_SOURCE 1
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <linux/fb.h>
#include <linux/kd.h>
#include <linux/vt.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#if defined(__i386__) || defined(__alpha__)
#include <sys/io.h>
#endif
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
#include <libubox/ulog.h>
#if defined(ENABLE_ALIVE_GIF)
#include <time.h>
#endif
typedef uint8_t uint8;
typedef uint16_t uint16;
typedef int bool;
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define PSPLASH_FIFO "psplash_fifo"
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
#ifndef DEBUG
#define DEBUG 0
#endif
#ifdef __GNUC__
#define UNUSED(x) UNUSED_##x __attribute__((__unused__))
#else
#define UNUSED(x) UNUSED_##x
#endif
typedef struct PSplashFont
{
char * name; /* Font name. */
int height; /* Height in pixels. */
int index_mask; /* ((1 << N) - 1). */
int * offset; /* (1 << N) offsets into index. */
int * index;
u_int32_t *content;
} PSplashFont;
#include "psplash-image.h"
#include "psplash-fb.h"
#include "psplash-console.h"
#include "psplash-uci.h"
#if defined(ENABLE_ALIVE_GIF)
#include "psplash-alive.h"
#endif
#endif