summaryrefslogtreecommitdiff
path: root/remotecfg/rc_common.h (plain)
blob: 991f163bd23930ceff594460e6962a17f13f4e3a
1/*
2 * include/uapi/linux/rc_common.h from the kernel directory, but it can be used
3 * in kernel and user space.
4 *
5 * Written by Amlogic
6 *
7 */
8#ifndef _UAPI_RC_COMMON_H_
9#define _UAPI_RC_COMMON_H_
10
11#include <linux/types.h>
12
13#define MAX_KEYMAP_SIZE 256
14#define CUSTOM_NAME_LEN 64
15
16/*to ensure kernel and user spase use the same header file*/
17#define SHARE_DATA_VERSION "v1.1.0"
18
19union _codemap {
20 struct ir_key_map {
21 __u16 keycode;
22 __u16 scancode;
23 } map;
24 __u32 code;
25};
26
27/*
28 *struct cursor_codemap - codemap for mouse mode
29 *
30 *@fn_key_scancode: scancode of fn key which used to swith mode
31 *@cursor_left_scancode: scancode of left key
32 *@cursor_right_scancode: scancode of right key
33 *@cursor_up_scancode: scancode of up key
34 *@cursor_down_scancode: scancode of down key
35 *@cursor_ok_scancode: scancode of ok key
36 */
37struct cursor_codemap {
38 __u16 fn_key_scancode;
39 __u16 cursor_left_scancode;
40 __u16 cursor_right_scancode;
41 __u16 cursor_up_scancode;
42 __u16 cursor_down_scancode;
43 __u16 cursor_ok_scancode;
44};
45
46/**
47 *struct ir_map_table - the IR key map table for different remote-control
48 *
49 *@custom_name: table name
50 *@cursor_code: mouse mode need
51 *@map_size: number of IR key
52 *@custom_code: custom code, identify different key mapping table
53 *@release_delay: release delay time
54 *@codemap[0]: code for IR key
55 */
56struct ir_map_tab {
57 char custom_name[CUSTOM_NAME_LEN];
58 struct cursor_codemap cursor_code;
59 __u16 map_size;
60 __u32 custom_code;
61 __u32 release_delay;
62 union _codemap codemap[0];
63};
64
65/**
66 *struct ir_sw_decode_para - configuration parameters for software decode
67 *
68 *@max_frame_time: maximum frame time
69 */
70struct ir_sw_decode_para {
71 unsigned int max_frame_time;
72};
73
74/*IOCTL commands*/
75#define REMOTE_IOC_SET_KEY_NUMBER _IOW('I', 3, __u32)
76#define REMOTE_IOC_SET_KEY_MAPPING_TAB _IOW('I', 4, __u32)
77#define REMOTE_IOC_SET_SW_DECODE_PARA _IOW('I', 5, __u32)
78#define REMOTE_IOC_GET_DATA_VERSION _IOR('I', 121, __u32)
79
80#endif
81