input_hal branch
[staging/toyota.git] / inc / input_hal_internal.h
1 /*
2  * @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef INC_INPUT_HAL_INTERNAL_H_
18 #define INC_INPUT_HAL_INTERNAL_H_
19
20 /*
21  * Touch panel operation function info
22  */
23 struct TouchHal {
24     /**
25      * \~english  Make touch panel start work.
26      */
27     int (* start)(void);
28     /**
29      * \~english  Get touch panel device horizontal resolution.
30      */
31     int (* get_reso_h)(int *);
32     /**
33      * \~english  Get touch panel device vertical resolution.
34      */
35     int (* get_reso_v)(int *);
36     /**
37      * \~english  Get whether X axis is inversion.
38      */
39     int (* get_reverse_axis_x)(bool *);
40     /**
41      * \~english  Get whether Y axis is inversion.
42      */
43     int (* get_reverse_axis_y)(bool *);
44     /**
45      * \~english  Config touch panel.
46      */
47     int (* config)(const char *, int, int);
48     /**
49      * \~english  Get touch panel device name.
50      */
51     int (* get_touch_devicename)(char*, size_t);
52     /**
53      * \~english  Get touch panel key device name.
54      */
55     int (* get_key_devicename)(char*, size_t);
56     /**
57      * \~english  Execute touch panel self test.
58      */
59     int (* selftest)(int, void *);
60     /**
61      * \~english  Get touch panel config status.
62      */
63     int (* get_config_status)(int *);
64     /**
65      * \~english  Set whether the driver sends touch panel data or not.
66      */
67     int (* set_touch_lock)(int);
68     /**
69      * \~english  Request touch panel touch suspend.
70      */
71     int (* set_touch_suspend)(void);
72     /**
73      * \~english  Set touch panel sensitivity level.
74      */
75     int (* set_sensitivity_level)(int);
76     /**
77      * \~english  Get touch panel sensitivity level.
78      */
79     int (* get_sensitivity_level)(int *);
80     /**
81      * \~english  Notify radio scan frequency.
82      */
83     int (* notify_radio_scan_frequency)(struct RadioInfoTouch *);
84 };
85
86
87 /**
88  * Config touch panel
89  */
90 int ConfigTouch(const char *path , int resolution_h, int resolution_v);
91
92 /**
93  * Get touch panel device name
94  */
95 int GetPanelNameTouch(char* name, size_t buf_length);
96
97 /**
98  * Get touch panel key device name
99  */
100 int GetKeyNameTouch(char* name, size_t buf_length);
101
102 /**
103  * Get touch panel config status
104  */
105 int GetConfigStatusTouch(int *status);
106
107 #endif  // INC_INPUT_HAL_INTERNAL_H_