FreeCalypso > hg > ffs-editor
comparison src/cs/drivers/drv_app/kpd/kpd_scan_functions.h @ 0:92470e5d0b9e
src: partial import from FC Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 15 May 2020 01:28:16 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:92470e5d0b9e |
---|---|
1 /** | |
2 * @file kpd_scan_functions.h | |
3 * | |
4 * Declaration of keypad interface functions. | |
5 * | |
6 * @author Laurent Sollier (l-sollier@ti.com) | |
7 * @version 0.1 | |
8 */ | |
9 | |
10 /* | |
11 * History: | |
12 * | |
13 * Date Author Modification | |
14 * ---------------------------------------- | |
15 * 10/10/2001 L Sollier Create | |
16 * | |
17 * | |
18 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved | |
19 */ | |
20 | |
21 #ifndef _KPD_SCAN_FUNCTIONS_H_ | |
22 #define _KPD_SCAN_FUNCTIONS_H_ | |
23 | |
24 #include "kpd/kpd_i.h" | |
25 | |
26 #include "rv/rv_general.h" | |
27 | |
28 | |
29 /* For Windows environment */ | |
30 #ifdef _WINDOWS | |
31 #ifdef __cplusplus | |
32 extern "C" | |
33 { | |
34 #endif | |
35 #endif | |
36 | |
37 /** | |
38 * @name Internal functions | |
39 * | |
40 */ | |
41 /*@{*/ | |
42 | |
43 | |
44 | |
45 #if (CHIPSET == 12) | |
46 | |
47 /** | |
48 * function: kpd_init_ctrl_reg | |
49 * Initialize the Control register | |
50 */ | |
51 void kpd_init_ctrl_reg(const UINT8 software_nreset, | |
52 const T_KPD_Nsoftware_mode nsoftware_mode, | |
53 const T_KPD_PTV ptv, | |
54 const T_KPD_EnableDetection long_key_process_en, | |
55 const T_KPD_EnableDetection time_out_empty_en, | |
56 const T_KPD_EnableDetection time_out_long_key_en, | |
57 const T_KPD_EnableDetection repeat_mode_en); | |
58 | |
59 | |
60 /** | |
61 * function: kpd_software_reset | |
62 * | |
63 * Reset software | |
64 */ | |
65 void kpd_software_reset(void); | |
66 | |
67 #endif | |
68 | |
69 /** | |
70 * function: kpd_initialize_keypad_hardware | |
71 * | |
72 * Hardware initialization (Not implemented on Riviera tool). | |
73 */ | |
74 void kpd_initialize_keypad_hardware(void); | |
75 | |
76 /** | |
77 * function: kpd_acknowledge_key_pressed | |
78 * | |
79 * Unmask keypad interrupt (Not implemented on Riviera tool). | |
80 */ | |
81 void kpd_acknowledge_key_pressed(void); | |
82 | |
83 /** | |
84 * function: kpd_key_pressed | |
85 * | |
86 * This function send the message T_KPD_KEY_PRESSED_MSG with the value of key pressed. | |
87 * | |
88 * @param value Physical key identification. | |
89 */ | |
90 void kpd_key_pressed(UINT8 value); | |
91 | |
92 | |
93 /** | |
94 * function: kpd_scan_keypad | |
95 * | |
96 * This function returns the physical key Id for the pressed key, or | |
97 * KPD_KEY_NULL if no key is pressed. | |
98 * | |
99 * @return Physical key identification. | |
100 */ | |
101 T_KPD_PHYSICAL_KEY_ID kpd_scan_keypad(void); | |
102 | |
103 | |
104 #ifdef _WINDOWS | |
105 | |
106 /** | |
107 * function: kpd_key_handler | |
108 * | |
109 * This function is called when a key is pressed (Interrupt process). | |
110 * | |
111 */ | |
112 void kpd_key_handler(void); | |
113 | |
114 | |
115 /** | |
116 * function: kpd_key_released | |
117 * | |
118 * This function send the message T_KPD_KEY_PRESSED_MSG with the value of key=KPD_PKEY_NULL. | |
119 * | |
120 */ | |
121 void kpd_key_released(void); | |
122 | |
123 /** | |
124 * function: kpd_set_key_value | |
125 * | |
126 * This function set the key identification. | |
127 * | |
128 * @param value Physical key identification. | |
129 */ | |
130 void kpd_set_key_value(T_KPD_PHYSICAL_KEY_ID value); | |
131 | |
132 #ifdef __cplusplus | |
133 } | |
134 #endif | |
135 #endif | |
136 | |
137 /*@}*/ | |
138 #endif /* #ifndef _KPD_SCAN_FUNCTIONS_H_ */ |