input_hal branch
[staging/toyota.git] / hal_api / input_hal.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 HAL_API_INPUT_HAL_H_
18 #define HAL_API_INPUT_HAL_H_
19
20 #include <native_service/frameworkunified_types.h>
21
22 #include "peripheral_service/aglinput.h"
23
24 /**
25  * @file input_hal.h
26  */
27
28 /** @addtogroup switchhandler
29  *  @{
30  */
31 /** @addtogroup input_hal
32  *  @ingroup switchhandler
33  *  @{
34  */
35
36 /************************************************************************
37 *           Macro definitions                                           *
38 ************************************************************************/
39 /**
40  * \~english  Return value type
41  */
42 enum HalInputRetType {
43     /**
44      * \~english  Success
45      */
46     HAL_INPUT_RET_NORMAL = 0,
47     /**
48      * \~english  Process abnormality
49      */
50     HAL_INPUT_RET_ERROR,
51     /**
52      * \~english  Not support
53      */
54     HAL_INPUT_RET_NOT_SUPPORT,
55 };
56 /**
57  * \~english  Touch panel IC type
58  */
59 enum HalInputTouchDeviceType {
60     /**
61      * \~english  Touch panel IC is invalid
62      */
63     HAL_INPUT_TOUCH_DEVICE_INVALID = 0,
64     /**
65      * \~english  Touch panel IC is ILITEK
66      */
67     HAL_INPUT_TOUCH_DEVICE_ILITEK,
68 };
69
70 /**
71  * \~english  Radio band type
72  */
73 enum HalInputBandType {
74     /**
75      * \~english  Radio band is AM
76      */
77     HAL_INPUT_BAND_TYPE_AM = 0,
78     /**
79      * \~english  Radio band isn't AM
80      */
81     HAL_INPUT_BAND_TYPE_NOT_AM,
82 };
83
84 /**
85  * \~english  Radio reception status
86  */
87 enum HalInputTuneStatus {
88     /**
89      * \~english  Radio is in normal state
90      */
91     HAL_INPUT_TUNE_STATUS_NORMAL = 0,
92     /**
93      * \~english  Radio is in search state
94      */
95     HAL_INPUT_TUNE_STATUS_SERACH,
96 };
97
98 /**
99  * \~english  Sensitivity Level
100  */
101 enum HalInputTouchSensitivityLevel {
102     /**
103      * \~english  Sensitivity level low
104      */
105     HAL_INPUT_TOUCH_SENSITIVITY_LEVEL_LOW = 1,
106     /**
107      * \~english  Sensitivity level middle
108      */
109     HAL_INPUT_TOUCH_SENSITIVITY_LEVEL_MIDDLE,
110     /**
111      * \~english  Sensitivity level high
112      */
113     HAL_INPUT_TOUCH_SENSITIVITY_LEVEL_HIGH,
114     /**
115      * \~english  Sensitivity level none
116      */
117     HAL_INPUT_TOUCH_SENSITIVITY_LEVEL_NONE,
118 };
119
120 /**
121  * \~english  input device type
122  */
123 enum HalInputDeviceType {
124   /**
125    * \~english The device type invalid
126    */
127   HAL_INPUT_DEVICE_INVALID,
128   /**
129    * \~english The device is keyboard
130    */
131   HAL_INPUT_DEVICE_KEYBOARD,
132   /**
133    * \~english The device is touch
134    */
135   HAL_INPUT_DEVICE_TOUCH,
136   /**
137    * \~english The device is ESC-KEY
138    */
139   HAL_INPUT_DEVICE_TOUCH_ESCKEY,
140   /**
141    * \~english The device is steering SW
142    */
143   HAL_INPUT_DEVICE_STEERING,
144   /**
145    * \~english The device is tablet finger
146    */
147   HAL_INPUT_DEVICE_TABLET_FINGER,
148   /**
149    * \~english The device is rotary key
150    */
151   HAL_INPUT_DEVICE_ROTARY_KEY,
152 };
153
154 /**
155  * \~english  Don't need to config touch panel
156  */
157 #define HAL_INPUT_TOUCH_CONFIG_OFF      (0)
158 /**
159  * \~english  Touch panel configed
160  */
161 #define HAL_INPUT_TOUCH_CONFIG_ON       (1)
162
163 /**
164  * \~english  Touch panel touch press
165  */
166 #define HAL_INPUT_TOUCH_PRESS           (0)
167 /**
168  * \~english  Touch panel touch release
169  */
170 #define HAL_INPUT_TOUCH_RELEASE         (1)
171
172 /**
173  * \~english  Don't report touch panel's touch event
174  */
175 #define HAL_INPUT_TOUCH_UNREPORT        (0)
176 /**
177  * \~english  Report touch panel's touch event
178  */
179 #define HAL_INPUT_TOUCH_REPORT          (1)
180
181 /**
182  * \~english  Test all case
183  */
184 #define HAL_INPUT_TOUCH_SELFTEST_ID_ALL         (0xFE)
185 /**
186  * \~english  Selftest data length
187  */
188 #define HAL_INPUT_TOUCH_SELFTEST_DATA_LEN       (5)
189 /**
190  * \~english  Selftest mode not support
191  */
192 #define HAL_INPUT_TOUCH_SELFTEST_NOT_SUPPORT    (0xEE)
193
194 /**
195  * \~english  max number of input_event per package.
196  */
197 #define HAL_INPUT_EVENT_COUNT 64
198
199 /**
200  * \~english  Thread name defined
201  */
202 #define HAL_INPUT_SOURCE_NAME   "input_hal_mon"
203
204 /**
205  * \~english  Notify input event from touch panel,
206  *            The data of the notification please refer the following two type.\n
207  *            @ref HAL_INPUT_TOUCH_PRESS \n
208  *            @ref HAL_INPUT_TOUCH_RELEASE \n
209  *            Please use IF of NSFW as follows to receive this event.
210  * \~ @code
211  * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(happ, HAL_INPUT_SOURCE_NAME, HAL_INPUT_NOTIFY_TOUCH, fpOnCmd);
212  * @endcode
213  * \~english note:FrameworkunifiedAttachCallbacksToDispatcher is available, too.
214  */
215 #define HAL_INPUT_NOTIFY_TOUCH            100
216 /**
217  * \~english  Notify input event from touch panel ESC-KEY,
218  *            The data format of the notification please refer to @ref EventsPackageInput.\n
219  *            Please use IF of NSFW as follows to receive this event.
220  * \~ @code
221  * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(happ, HAL_INPUT_SOURCE_NAME, HAL_INPUT_NOTIFY_ESC_KEY, fpOnCmd)
222  * @endcode
223  * \~english note:FrameworkunifiedAttachCallbacksToDispatcher is available, too.
224  */
225 #define HAL_INPUT_NOTIFY_ESC_KEY          101
226 /**
227  * \~english  Notify input event from key board,
228  *            The data format of the notification please refer to @ref EventsPackageInput.\n
229  *            Please use IF of NSFW as follows to receive this event.
230  * \~ @code
231  * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(happ, HAL_INPUT_SOURCE_NAME, HAL_INPUT_NOTIFY_KEY_BOARD, fpOnCmd)
232  * @endcode
233  * \~english note:FrameworkunifiedAttachCallbacksToDispatcher is available, too.
234  */
235 #define HAL_INPUT_NOTIFY_KEY_BOARD        102
236 /**
237  * \~english  Notify input event from steering,
238  *            The data format of the notification please refer to @ref EventsPackageInput.\n
239  *            Please use IF of NSFW as follows to receive this event.
240  * \~ @code
241  * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(happ, HAL_INPUT_SOURCE_NAME, HAL_INPUT_NOTIFY_STEERING, fpOnCmd)
242  * @endcode
243  * \~english note:FrameworkunifiedAttachCallbacksToDispatcher is available, too.
244  */
245 #define HAL_INPUT_NOTIFY_STEERING         104
246 /**
247  * \~english  Notify input event from tablet finger,
248  *            The data format of the notification please refer to @ref EventsPackageInput.\n
249  *            Please use IF of NSFW as follows to receive this event.
250  * \~ @code
251  * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(happ, HAL_INPUT_SOURCE_NAME, HAL_INPUT_NOTIFY_TABLET_FINGER, fpOnCmd)
252  * @endcode
253  * \~english note:FrameworkunifiedAttachCallbacksToDispatcher is available, too.
254  */
255 #define HAL_INPUT_NOTIFY_TABLET_FINGER    105
256 /**
257  * \~english  Notify input event from rotary-key,
258  *            The data format of the notification please refer to @ref EventsPackageInput.\n
259  *            Please use IF of NSFW as follows to receive this event.
260  * \~ @code
261  * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(happ, HAL_INPUT_SOURCE_NAME, HAL_INPUT_NOTIFY_ROTARY_KEY, fpOnCmd)
262  * @endcode
263  * \~english note:FrameworkunifiedAttachCallbacksToDispatcher is available, too.
264  */
265 #define HAL_INPUT_NOTIFY_ROTARY_KEY    106
266
267 /**
268  * \~english  Initialzing touch result notify,
269  *            The data format of the notification please refer to @ref TouchInitFinishInput.\n
270  *            Please use IF of NSFW as follows to receive this event.
271  * \~ @code
272  * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(happ, HAL_INPUT_SOURCE_NAME, HAL_INPUT_NOTIFY_TOUCH_INIT_FINISH, fpOnCmd)
273  * @endcode
274  * \~english note:FrameworkunifiedAttachCallbacksToDispatcher is available, too.
275  */
276 #define HAL_INPUT_NOTIFY_TOUCH_INIT_FINISH   120
277
278 /**
279  * @struct RadioInfoTouch
280  * \~english @par Brief
281  *          Radio information
282  */
283 struct RadioInfoTouch {
284     /**
285      * \~english  Radio band type
286      * \~english Please ref to @ref HalInputBandType
287      */
288     int16_t     band;
289     /**
290      * \~english  Frequency of the tuner[kHz]
291      *      (Use only at the time of AM reception)
292      */
293     uint16_t    freq;
294     /**
295      * \~english  Reception status (Use only at the time of AM reception)
296      * \~english Please refer to @ref HalInputBandType
297      */
298     int32_t     status;
299 };
300
301 /**
302  * @struct SelftestTouch
303  * \~english @par Brief
304  *          Touch panel selftest mode result
305  */
306 struct SelftestTouch {
307     /**
308      * \~english  Touch panel selftest mode result
309      */
310     unsigned char r_code;
311     /**
312      * \~english  Touch panel selftest mode data.
313      *     The datail info is depend on hardware spec.
314      */
315     unsigned char r_data[HAL_INPUT_TOUCH_SELFTEST_DATA_LEN];
316 };
317
318 /**
319  * @struct EventsPackageInput
320  * \~english @par Brief
321  *          Input event package defined
322  */
323 struct EventsPackageInput {
324   /**
325    * \~english device type
326    */
327   int device_type;
328   /**
329    * \~english event count
330    */
331   int count;
332   /**
333    * \~english input event data.
334    */
335   struct input_event event[HAL_INPUT_EVENT_COUNT];
336 };
337
338 /**
339  * @struct TouchInitFinishInput
340  * \~english @par Brief
341  *          The result of initializing touch
342  */
343 struct TouchInitFinishInput {
344   /**
345    * \~english  If initializing the touch successful, the result was set HAL_INPUT_RET_NORMAL.
346    *            If an error occurred, the result was set HAL_INPUT_RET_ERROR.
347    */
348   int   result;
349 };
350 /************************************************************************
351 *           Function prototype                                            *
352 ************************************************************************/
353
354 ////////////////////////////////////////////////////////////////////////////////
355 /// \ingroup input_hal
356 /// \~english @par Brief
357 ///       initializing input_hal.
358 /// \~english @param [in] app_name
359 ///       const char* - the app name for receive input event.
360 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
361 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
362 /// \~english @par Prerequisite
363 ///       - Have called @ref InitTouch()
364 /// \~english @par Change of internal state
365 ///       - Change of internal state according to the API does not occur
366 /// \~english @par Conditions of processing failure
367 ///       - None
368 /// \~english @par Classification
369 ///       Public
370 /// \~english @par Type
371 ///       Sync
372 /// \~english @par Detail
373 ///       - Listen input devices and send input event.
374 ///       - After initializing touch panel, the event(@ref HAL_INPUT_NOTIFY_TOUCH_INIT_FINISH) will be sent.
375 ///       - The API can be used by 1 process.
376 /// \~english @see None.
377 ////////////////////////////////////////////////////////////////////////////////
378 int InitInput(const char* app_name);
379
380 ////////////////////////////////////////////////////////////////////////////////
381 /// \ingroup input_hal
382 /// \~english @par Brief
383 ///       finalize input_hal
384 /// \~english @param none
385 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
386 /// \~english @par Prerequisite
387 ///       - None
388 /// \~english @par Change of internal state
389 ///       - Change of internal state according to the API does not occur
390 /// \~english @par Conditions of processing failure
391 ///       - None
392 /// \~english @par Classification
393 ///       Public
394 /// \~english @par Type
395 ///       Sync
396 /// \~english @par Detail
397 ///       - This API is to finalize input_hal.
398 ///       - The API can be used by 1 process.
399 /// \~english @see None
400 ////////////////////////////////////////////////////////////////////////////////
401 int DeInitInput();
402
403 ////////////////////////////////////////////////////////////////////////////////
404 /// \ingroup input_hal
405 /// \~english @par Brief
406 ///       Init those operating function of touch panel driver
407 /// \~english @param none
408 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
409 /// \~english @par Prerequisite
410 ///       - Touch panel function exist
411 /// \~english @par Change of internal state
412 ///       - Change of internal state according to the API does not occur
413 /// \~english @par Conditions of processing failure
414 ///       - None
415 /// \~english @par Classification
416 ///       Public
417 /// \~english @par Type
418 ///       Sync
419 /// \~english @par Detail
420 ///       - The API is a block I/F which initializes those operating functions of touch panel driver.
421 ///       - The API can be used by 1 process.
422 /// \~english @see None
423 ////////////////////////////////////////////////////////////////////////////////
424 int InitTouch();
425
426 ////////////////////////////////////////////////////////////////////////////////
427 /// \ingroup input_hal
428 /// \~english @par Brief
429 ///       Make touch panel start work
430 /// \~english @param none
431 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
432 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
433 /// \~english @par Prerequisite
434 ///       - Have called @ref InitTouch()
435 /// \~english @par Change of internal state
436 ///       - Change of internal state according to the API does not occur
437 /// \~english @par Conditions of processing failure
438 ///       - Haven't called @ref InitTouch()
439 ///         - @ref HAL_INPUT_RET_ERROR
440 ///       - Inner io error
441 ///         - @ref HAL_INPUT_RET_ERROR
442 /// \~english @par Classification
443 ///       Public
444 /// \~english @par Type
445 ///       Sync
446 /// \~english @par Detail
447 ///       - This API is to prepare touch panel and make it start work.
448 ///       - The API can be used by 1 process.
449 /// \~english @see None
450 ////////////////////////////////////////////////////////////////////////////////
451 int StartTouch();
452
453 ////////////////////////////////////////////////////////////////////////////////
454 /// \ingroup input_hal
455 /// \~english @par Brief
456 ///       Execute touch panel self test
457 /// \~english @param [in] id
458 ///        int    - selftest id(Pass HAL_INPUT_TOUCH_SELFTEST_ID_ALL :
459 ///                 Execute all test(disconnection check))
460 /// \~english @param [out] result
461 ///        void*  - Touch panel selftest mode check result
462 /// \~english @note Result struct SelftestTouch depend on hardware spec
463 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
464 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
465 /// \~english @retval HAL_INPUT_RET_NOT_SUPPORT : Not support
466 /// \~english @par Prerequisite
467 ///       - Have called @ref InitTouch()
468 /// \~english @par Change of internal state
469 ///       - Change of internal state according to the API does not occur
470 /// \~english @par Conditions of processing failure
471 ///       - Haven't called @ref InitTouch()
472 ///         - @ref HAL_INPUT_RET_ERROR
473 ///       - Not support this function
474 ///         - @ref HAL_INPUT_RET_NOT_SUPPORT
475 ///       - Param result is NULL
476 ///         - @ref HAL_INPUT_RET_ERROR
477 ///       - Inner io error
478 ///         - @ref HAL_INPUT_RET_ERROR
479 /// \~english @par Classification
480 ///       Public
481 /// \~english @par Type
482 ///       Sync
483 /// \~english @par Detail
484 ///       - This API is to execute touch panel self test and get test result.
485 ///       - The API can be used by 1 process.
486 /// \~english @see None
487 ////////////////////////////////////////////////////////////////////////////////
488 int SelfTestTouch(int id, void *result);
489
490 ////////////////////////////////////////////////////////////////////////////////
491 /// \ingroup input_hal
492 /// \~english @par Brief
493 ///       Set whether the driver sends touch panel data or not.
494 /// \~english @param [in] status
495 ///       int    - Touch panel whether report/unreport event\n
496 ///              HAL_INPUT_TOUCH_REPORT : Report touch panel's touch event\n
497 ///              HAL_INPUT_TOUCH_UNREPORT : Don't report touch panel's touch event\n
498 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
499 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
500 /// \~english @retval HAL_INPUT_RET_NOT_SUPPORT : Not support
501 /// \~english @note It means this API isn't support when return
502 ///                 @ref HAL_INPUT_RET_NOT_SUPPORT.
503 ///                 The user need to implement it
504 ///                 if don't need to report touch event.
505 /// \~english @par Prerequisite
506 ///       - Have called @ref InitTouch()
507 /// \~english @par Change of internal state
508 ///       - Change of internal state according to the API does not occur
509 /// \~english @par Conditions of processing failure
510 ///       - Haven't called @ref InitTouch()
511 ///         - @ref HAL_INPUT_RET_ERROR
512 ///       - Not support this function
513 ///         - @ref HAL_INPUT_RET_NOT_SUPPORT
514 ///       - Status is none of @ref HAL_INPUT_TOUCH_REPORT /
515 ///         @ref HAL_INPUT_TOUCH_UNREPORT
516 ///         - @ref HAL_INPUT_RET_ERROR
517 ///       - Inner io error
518 ///         - @ref HAL_INPUT_RET_ERROR
519 /// \~english @par Classification
520 ///       Public
521 /// \~english @par Type
522 ///       Sync
523 /// \~english @par Detail
524 ///       - This API is to set whether the driver sends touch panel data or not.
525 ///       - The API can be used by 1 process.
526 /// \~english @see None
527 ////////////////////////////////////////////////////////////////////////////////
528 int LockTouch(int status);
529
530 ////////////////////////////////////////////////////////////////////////////////
531 /// \ingroup input_hal
532 /// \~english @par Brief
533 ///       Suspend touch panel
534 /// \~english @param none
535 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
536 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
537 /// \~english @retval HAL_INPUT_RET_NOT_SUPPORT : Not support
538 /// \~english @note It means this API isn't support when return
539 ///                 @ref HAL_INPUT_RET_NOT_SUPPORT.
540 ///                 The user need to implement it
541 ///                 if don't need to report touch event.
542 /// \~english @par Prerequisite
543 ///       - Have called @ref InitTouch()
544 /// \~english @par Change of internal state
545 ///       - Change of internal state according to the API does not occur
546 /// \~english @par Conditions of processing failure
547 ///       - Haven't called @ref InitTouch()
548 ///         - @ref HAL_INPUT_RET_ERROR
549 ///       - Not support this function
550 ///         - @ref HAL_INPUT_RET_NOT_SUPPORT
551 ///       - Inner io error
552 ///         - @ref HAL_INPUT_RET_ERROR
553 /// \~english @par Classification
554 ///       Public
555 /// \~english @par Type
556 ///       Sync
557 /// \~english @par Detail
558 ///       - This API is to suspend touch panel.
559 ///       - The API can be used by 1 process.
560 /// \~english @see None
561 ////////////////////////////////////////////////////////////////////////////////
562 int SuspendTouch();
563
564 ////////////////////////////////////////////////////////////////////////////////
565 /// \ingroup input_hal
566 /// \~english @par Brief
567 ///       Set touch panel sensitivity level
568 /// \~english @param [in] level
569 ///       int    - Sensitivity level.
570 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
571 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
572 /// \~english @retval HAL_INPUT_RET_NOT_SUPPORT : Not support
573 /// \~english @par Prerequisite
574 ///       - Have called @ref InitTouch()
575 /// \~english @par Change of internal state
576 ///       - Change of internal state according to the API does not occur
577 /// \~english @par Conditions of processing failure
578 ///       - Haven't called @ref InitTouch()
579 ///         - @ref HAL_INPUT_RET_ERROR
580 ///       - Not support this function
581 ///         - @ref HAL_INPUT_RET_NOT_SUPPORT
582 ///       - Sensitivity level is none of @ref HalInputTouchSensitivityLevel
583 ///         - @ref HAL_INPUT_RET_ERROR
584 ///       - Inner io error
585 ///         - @ref HAL_INPUT_RET_ERROR
586 /// \~english @par Classification
587 ///       Public
588 /// \~english @par Type
589 ///       Sync
590 /// \~english @par Detail
591 ///       - This API is to set touch panel sensitivity level.
592 ///       - The API can be used by 1 process.
593 /// \~english @see None
594 ////////////////////////////////////////////////////////////////////////////////
595 int SetSensitivityLevelTouch(int level);
596
597 ////////////////////////////////////////////////////////////////////////////////
598 /// \ingroup input_hal
599 /// \~english @par Brief
600 ///       Get touch panel sensitivity level
601 /// \~english @param [out] level
602 ///       int*    - Sensitivity level.
603 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
604 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
605 /// \~english @retval HAL_INPUT_RET_NOT_SUPPORT : Not support
606 /// \~english @par Prerequisite
607 ///       - Have called @ref InitTouch()
608 /// \~english @par Change of internal state
609 ///       - Change of internal state according to the API does not occur
610 /// \~english @par Conditions of processing failure
611 ///       - Haven't called @ref InitTouch()
612 ///         - @ref HAL_INPUT_RET_ERROR
613 ///       - Not support this function
614 ///         - @ref HAL_INPUT_RET_NOT_SUPPORT
615 ///       - Param level is NULL
616 ///         - @ref HAL_INPUT_RET_ERROR
617 ///       - Inner io error
618 ///         - @ref HAL_INPUT_RET_ERROR
619 /// \~english @par Classification
620 ///       Public
621 /// \~english @par Type
622 ///       Sync
623 /// \~english @par Detail
624 ///       - This API is to get touch panel sensitivity level.
625 ///       - The API can be used by 1 process.
626 /// \~english @see None
627 ////////////////////////////////////////////////////////////////////////////////
628 int GetSensitivityLevelTouch(int *level);
629
630 ////////////////////////////////////////////////////////////////////////////////
631 /// \ingroup input_hal
632 /// \~english @par Brief
633 ///       Notify radio scan frequency
634 /// \~english @param [in] info
635 ///       RadioInfoTouch*    - SCAN frequence info
636 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
637 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
638 /// \~english @retval HAL_INPUT_RET_NOT_SUPPORT : Not support
639 /// \~english @par Prerequisite
640 ///       - Have called @ref InitTouch()
641 /// \~english @par Change of internal state
642 ///       - Change of internal state according to the API does not occur
643 /// \~english @par Conditions of processing failure
644 ///       - Haven't called @ref InitTouch()
645 ///         - @ref HAL_INPUT_RET_ERROR
646 ///       - Not support this function
647 ///         - @ref HAL_INPUT_RET_NOT_SUPPORT
648 ///       - Param info is NULL
649 ///         - @ref HAL_INPUT_RET_ERROR
650 ///       - Inner io error
651 ///         - @ref HAL_INPUT_RET_ERROR
652 /// \~english @par Classification
653 ///       Public
654 /// \~english @par Type
655 ///       Sync
656 /// \~english @par Detail
657 ///       - This API is to notify radio scan frequency.
658 ///       - The API can be used by 1 process.
659 /// \~english @see None
660 ////////////////////////////////////////////////////////////////////////////////
661 int NotifyRadioScanFreqTouch(struct RadioInfoTouch *info);
662
663 ////////////////////////////////////////////////////////////////////////////////
664 /// \ingroup input_hal
665 /// \~english @par Brief
666 ///       Get panel resolution
667 /// \~english @param [in] reso_h
668 ///       int*      - horizontal resolution
669 /// \~english @param [in] reso_v
670 ///       int*      - vertical resolution
671 /// \~english @retval HAL_INPUT_RET_NORMAL : Success
672 /// \~english @retval HAL_INPUT_RET_ERROR : Process abnormality
673 /// \~english @par Prerequisite
674 ///       - Have called @ref InitTouch()
675 /// \~english @par Change of internal state
676 ///       - Change of internal state according to the API does not occur
677 /// \~english @par Conditions of processing failure
678 ///       - Param reso_h or reso_v is NULL
679 ///         - @ref HAL_INPUT_RET_ERROR
680 ///       - Inner io error
681 ///         - @ref HAL_INPUT_RET_ERROR
682 /// \~english @par Classification
683 ///       Public
684 /// \~english @par Type
685 ///       Sync
686 /// \~english @par Detail
687 ///       - This API is to get horizontal and vertical resolution.
688 ///       - The API can be used by 1 process.
689 /// \~english @see None
690 ////////////////////////////////////////////////////////////////////////////////
691 int GetPanelSpecResolutionInput(int *reso_h, int *reso_v);
692
693 /** @}*/  // end of input_hal
694 /** @}*/  // end of switchhandler
695
696 #endif  // HAL_API_INPUT_HAL_H_