106 EEdgeFalling, |
114 EEdgeFalling, |
107 EEdgeRising, |
115 EEdgeRising, |
108 EEdgeBoth |
116 EEdgeBoth |
109 }; |
117 }; |
110 |
118 |
|
119 /** |
|
120 Enumeration TGpioBaseId defines the highest 16 bits of 32 bit GPIO Id |
|
121 to identify the GPIO hardware block: |
|
122 - EInternalId - The SOC GPIO hardware block (and any extender that is |
|
123 covered by the vendor supplied implementation) supports |
|
124 pin ids from 0-65535 |
|
125 - EExtender0-15 - Up to 16 3rd party extenders (each supporting up |
|
126 to 65536 pins) can be used. |
|
127 */ |
|
128 enum TGpioBaseId |
|
129 { |
|
130 EInternalId = 0x00000000, |
|
131 EExtender0 = 0x00010000, |
|
132 EExtender1 = 0x00020000, |
|
133 EExtender2 = 0x00040000, |
|
134 EExtender3 = 0x00080000, |
|
135 EExtender4 = 0x00100000, |
|
136 EExtender5 = 0x00200000, |
|
137 EExtender6 = 0x00400000, |
|
138 EExtender7 = 0x00800000, |
|
139 EExtender8 = 0x01000000, |
|
140 EExtender9 = 0x02000000, |
|
141 EExtender10 = 0x04000000, |
|
142 EExtender11 = 0x08000000, |
|
143 EExtender12 = 0x10000000, |
|
144 EExtender13 = 0x20000000, |
|
145 EExtender14 = 0x40000000, |
|
146 EExtender15 = 0x80000000 |
|
147 }; |
|
148 |
|
149 |
|
150 |
111 /** |
151 /** |
112 Sets the pin mode. |
152 Sets the pin mode. |
113 |
153 |
114 @param aId The pin Id. |
154 @param aId The pin Id. |
115 @param aMode The pin mode. |
155 @param aMode The pin mode. |
198 */ |
238 */ |
199 IMPORT_C static TInt SetPinIdleConfigurationAndState(TInt aId, TInt aConf); |
239 IMPORT_C static TInt SetPinIdleConfigurationAndState(TInt aId, TInt aConf); |
200 |
240 |
201 /** |
241 /** |
202 Reads the pin idle configuration and state. |
242 Reads the pin idle configuration and state. |
203 |
|
204 @param aId The pin Id. |
243 @param aId The pin Id. |
205 @param aConf On return contains the idle configuration and state previoulsy |
244 @param aConf On return contains the idle configuration and state previoulsy |
206 set on the pin. |
245 set on the pin. |
207 |
246 |
208 @return KErrNone, if successful; |
247 @return KErrNone, if successful; |
240 KErrArgument, if aId is invalid; |
279 KErrArgument, if aId is invalid; |
241 KErrNotSupported if pin does not support interrupts; |
280 KErrNotSupported if pin does not support interrupts; |
242 KErrGeneral, if there is no ISR bound to this interrupt. |
281 KErrGeneral, if there is no ISR bound to this interrupt. |
243 */ |
282 */ |
244 IMPORT_C static TInt UnbindInterrupt(TInt aId); |
283 IMPORT_C static TInt UnbindInterrupt(TInt aId); |
245 |
|
246 /** |
284 /** |
247 Enables the interrupt on specified pin. |
285 Enables the interrupt on specified pin. |
248 |
286 |
249 @param aId The pin Id. |
287 @param aId The pin Id. |
250 |
288 |
252 KErrArgument, if aId is invalid; |
290 KErrArgument, if aId is invalid; |
253 KErrNotSupported if pin does not support interrupts; |
291 KErrNotSupported if pin does not support interrupts; |
254 KErrGeneral, if there is no ISR bound to this interrupt. |
292 KErrGeneral, if there is no ISR bound to this interrupt. |
255 */ |
293 */ |
256 IMPORT_C static TInt EnableInterrupt(TInt aId); |
294 IMPORT_C static TInt EnableInterrupt(TInt aId); |
257 |
|
258 /** |
295 /** |
259 Disables the interrupt on specified pin. |
296 Disables the interrupt on specified pin. |
260 |
297 |
261 @param aId The pin Id. |
298 @param aId The pin Id. |
262 |
299 |
456 |
493 |
457 @return KErrNone, if accepted; |
494 @return KErrNone, if accepted; |
458 KErrArgument, if aId is invalid. |
495 KErrArgument, if aId is invalid. |
459 KErrNotSupported, if reading the state asynchronously is not supported. |
496 KErrNotSupported, if reading the state asynchronously is not supported. |
460 |
497 |
461 This API should be used with off-chip GPIO modules only; |
|
462 The result of the read operation and the state of the input pin will be passed as an argument to the callback function; |
498 The result of the read operation and the state of the input pin will be passed as an argument to the callback function; |
463 */ |
499 */ |
464 IMPORT_C static TInt GetInputState(TInt aId, TGpioCallback* aCb); |
500 IMPORT_C static TInt GetInputState(TInt aId, TGpioCallback* aCb); |
465 |
501 |
466 /** |
502 /** |
472 |
508 |
473 @return KErrNone, if accepted; |
509 @return KErrNone, if accepted; |
474 KErrArgument, if aId is invalid; |
510 KErrArgument, if aId is invalid; |
475 KErrNotSupported, if setting its state asynchronously is not supported. |
511 KErrNotSupported, if setting its state asynchronously is not supported. |
476 |
512 |
477 This API should be used with off-chip GPIO modules only; |
513 |
478 The result of the set operation will be passed as an argument to the callback function; |
514 The result of the set operation will be passed as an argument to the callback function; |
479 */ |
515 */ |
480 IMPORT_C static TInt SetOutputState(TInt aId, TGpioState aState, TGpioCallback* aCb); |
516 IMPORT_C static TInt SetOutputState(TInt aId, TGpioState aState, TGpioCallback* aCb); |
481 |
517 |
482 /** |
518 /** |