Hardware Reference
In-Depth Information
14 #include <sys/poll.h>
15 #include <getopt.h>
16
17 static int gpio_inpin = 17; /
GPIO input pin
/
18 static int is_signaled = 0; /
Exit program if signaled
/
19 static int gpio_fd = −1; /
Open file descriptor
/
20
21 static jmp_buf jmp_exit;
22
23 typedef enum {
24 gp_export=0, /
/sys/class/gpio/export
/
25 gp_unexport, /
/sys/class/gpio/unexport
/
26 gp_direction, /
/sys/class/gpio%d/direction
/
27 gp_edge, /
/sys/class/gpio%d/edge
/
28 gp_value /
/sys/class/gpio%d/value
/
29 } gpio_path_t ;
30
31 /
32
Samsung Remote Codes :
33
/
34 #define IR_POWER 0xE0E040BF
35 #define IR_0 0xE0E08877
36 #define IR_1 0xE0E020DF
37 #define IR_2 0xE0E0A05F
38 #define IR_3 0xE0E0609F
39 #define IR_4 0xE0E010EF
40 #define IR_5 0xE0E0906F
41 #define IR_6 0xE0E050AF
42 #define IR_7 0xE0E030CF
43 #define IR_8 0xE0E0B04F
44 #define IR_9 0xE0E0708F
45 #define IR_EXIT 0xE0E0B44B
46 #define IR_RETURN 0xE0E01AE5
47 #define IR_MUTE 0xE0E0F00F
48
49 static struct {
50 unsigned long ir_code; /
IR Code
/
51 const char
text; /
Display text
/
52 } ir_codes[] = {
53 { IR_POWER, "\n<POWER>\n" } ,
54 { IR_0, "0" } ,
55 { IR_1, "1" } ,
56 { IR_2, "2" } ,
57 { IR_3, "3" } ,
58 { IR_4, "4" } ,
59 { IR_5, "5" } ,
60 { IR_6, "6" } ,
61 { IR_7, "7" } ,
Search WWH ::




Custom Search