106 EEdgeFalling, |
106 EEdgeFalling, |
107 EEdgeRising, |
107 EEdgeRising, |
108 EEdgeBoth |
108 EEdgeBoth |
109 }; |
109 }; |
110 |
110 |
|
111 /** |
|
112 Enumeration TGpioBaseId defines the highest 16 bits of 32 bit GPIO Id |
|
113 to identify the GPIO hardware block: |
|
114 - EInternalId - The SOC GPIO hardware block (and any extender that is |
|
115 covered by the vendor supplied implementation) supports |
|
116 pin ids from 0-65535 |
|
117 - EExtender0-15 - Up to 16 3rd party extenders (each supporting up |
|
118 to 65536 pins) can be used. |
|
119 */ |
|
120 enum TGpioBaseId |
|
121 { |
|
122 EInternalId = 0x00000000, |
|
123 EExtender0 = 0x00010000, |
|
124 EExtender1 = 0x00020000, |
|
125 EExtender2 = 0x00040000, |
|
126 EExtender3 = 0x00080000, |
|
127 EExtender4 = 0x00100000, |
|
128 EExtender5 = 0x00200000, |
|
129 EExtender6 = 0x00400000, |
|
130 EExtender7 = 0x00800000, |
|
131 EExtender8 = 0x01000000, |
|
132 EExtender9 = 0x02000000, |
|
133 EExtender10 = 0x04000000, |
|
134 EExtender11 = 0x08000000, |
|
135 EExtender12 = 0x10000000, |
|
136 EExtender13 = 0x20000000, |
|
137 EExtender14 = 0x40000000, |
|
138 EExtender15 = 0x80000000 |
|
139 }; |
|
140 |
|
141 |
|
142 |
111 /** |
143 /** |
112 Sets the pin mode. |
144 Sets the pin mode. |
113 |
145 |
114 @param aId The pin Id. |
146 @param aId The pin Id. |
115 @param aMode The pin mode. |
147 @param aMode The pin mode. |
456 |
488 |
457 @return KErrNone, if accepted; |
489 @return KErrNone, if accepted; |
458 KErrArgument, if aId is invalid. |
490 KErrArgument, if aId is invalid. |
459 KErrNotSupported, if reading the state asynchronously is not supported. |
491 KErrNotSupported, if reading the state asynchronously is not supported. |
460 |
492 |
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; |
493 The result of the read operation and the state of the input pin will be passed as an argument to the callback function; |
463 */ |
494 */ |
464 IMPORT_C static TInt GetInputState(TInt aId, TGpioCallback* aCb); |
495 IMPORT_C static TInt GetInputState(TInt aId, TGpioCallback* aCb); |
465 |
496 |
466 /** |
497 /** |
472 |
503 |
473 @return KErrNone, if accepted; |
504 @return KErrNone, if accepted; |
474 KErrArgument, if aId is invalid; |
505 KErrArgument, if aId is invalid; |
475 KErrNotSupported, if setting its state asynchronously is not supported. |
506 KErrNotSupported, if setting its state asynchronously is not supported. |
476 |
507 |
477 This API should be used with off-chip GPIO modules only; |
508 |
478 The result of the set operation will be passed as an argument to the callback function; |
509 The result of the set operation will be passed as an argument to the callback function; |
479 */ |
510 */ |
480 IMPORT_C static TInt SetOutputState(TInt aId, TGpioState aState, TGpioCallback* aCb); |
511 IMPORT_C static TInt SetOutputState(TInt aId, TGpioState aState, TGpioCallback* aCb); |
481 |
512 |
482 /** |
513 /** |