-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathipodhardware.h
More file actions
49 lines (38 loc) · 1.23 KB
/
ipodhardware.h
File metadata and controls
49 lines (38 loc) · 1.23 KB
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
#ifndef _IPODHARDWARE_H_
#define _IPODHARDWARE_H_
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#ifdef IPOD
#include <linux/fb.h>
#endif
#ifdef IPOD
#define CPUINFOLOC "/proc/cpuinfo"
#define MOUNTSLOC "/proc/mounts"
#define APMLOC "/proc/apm"
#else
#define CPUINFOLOC "cpuinfo"
#define MOUNTSLOC "mounts"
#define APMLOC "apm"
#endif
#define LCD_DATA 0x10
#define LCD_CMD 0x08
#define IPOD_OLD_LCD_BASE 0xc0001000
#define IPOD_OLD_LCD_RTC 0xcf001110
#define IPOD_NEW_LCD_BASE 0x70003000
#define IPOD_NEW_LCD_RTC 0x60005010
#define IPOD_STD_LCD_BUSY_MASK 0x8000
#define IPOD_COL_LCD_BUSY_MASK 0x80000000
#define FBIOGET_CONTRAST _IOR('F', 0x22, int)
#define FBIOSET_CONTRAST _IOW('F', 0x23, int)
#define FBIOGET_BACKLIGHT _IOR('F', 0x24, int)
#define FBIOSET_BACKLIGHT _IOW('F', 0x25, int)
#define FB_DEV_NAME "/dev/fb0"
#define FB_DEVFS_NAME "/dev/fb/0"
#define inb(a) (*(volatile unsigned char *) (a))
#define outb(a,b) (*(volatile unsigned char *) (b) = (a))
#define inw(a) (*(volatile unsigned short *) (a))
#define outw(a,b) (*(volatile unsigned short *) (b) = (a))
#define inl(a) (*(volatile unsigned long *) (a))
#define outl(a,b) (*(volatile unsigned long *) (b) = (a))
#endif /* _IPODHARDWARE_H_ */