--- a/kernel/eka/include/drivers/gpio.h Thu Aug 19 11:14:22 2010 +0300
+++ b/kernel/eka/include/drivers/gpio.h Tue Aug 31 16:34:26 2010 +0300
@@ -18,6 +18,14 @@
#ifndef __GPIO_H__
#define __GPIO_H__
+#include <dfcs.h>
+
+#ifdef __USE_GPIO_STATIC_EXTENSION__
+// test standard extension handler number. *DO NOT USE*
+#define KTestStaticExtension 0x80000000
+#include <staticextension.h>
+#endif
+
class TGpioCallback; //forward declaration
/**
@@ -108,6 +116,38 @@
EEdgeBoth
};
+ /**
+ Enumeration TGpioBaseId defines the highest 16 bits of 32 bit GPIO Id
+ to identify the GPIO hardware block:
+ - EInternalId - The SOC GPIO hardware block (and any extender that is
+ covered by the vendor supplied implementation) supports
+ pin ids from 0-65535
+ - EExtender0-15 - Up to 16 3rd party extenders (each supporting up
+ to 65536 pins) can be used.
+ */
+ enum TGpioBaseId
+ {
+ EInternalId = 0x00000000,
+ EExtender0 = 0x00010000,
+ EExtender1 = 0x00020000,
+ EExtender2 = 0x00040000,
+ EExtender3 = 0x00080000,
+ EExtender4 = 0x00100000,
+ EExtender5 = 0x00200000,
+ EExtender6 = 0x00400000,
+ EExtender7 = 0x00800000,
+ EExtender8 = 0x01000000,
+ EExtender9 = 0x02000000,
+ EExtender10 = 0x04000000,
+ EExtender11 = 0x08000000,
+ EExtender12 = 0x10000000,
+ EExtender13 = 0x20000000,
+ EExtender14 = 0x40000000,
+ EExtender15 = 0x80000000
+ };
+
+
+
/**
Sets the pin mode.
@@ -200,7 +240,6 @@
/**
Reads the pin idle configuration and state.
-
@param aId The pin Id.
@param aConf On return contains the idle configuration and state previoulsy
set on the pin.
@@ -242,7 +281,6 @@
KErrGeneral, if there is no ISR bound to this interrupt.
*/
IMPORT_C static TInt UnbindInterrupt(TInt aId);
-
/**
Enables the interrupt on specified pin.
@@ -254,7 +292,6 @@
KErrGeneral, if there is no ISR bound to this interrupt.
*/
IMPORT_C static TInt EnableInterrupt(TInt aId);
-
/**
Disables the interrupt on specified pin.
@@ -458,7 +495,6 @@
KErrArgument, if aId is invalid.
KErrNotSupported, if reading the state asynchronously is not supported.
- This API should be used with off-chip GPIO modules only;
The result of the read operation and the state of the input pin will be passed as an argument to the callback function;
*/
IMPORT_C static TInt GetInputState(TInt aId, TGpioCallback* aCb);
@@ -474,7 +510,7 @@
KErrArgument, if aId is invalid;
KErrNotSupported, if setting its state asynchronously is not supported.
- This API should be used with off-chip GPIO modules only;
+
The result of the set operation will be passed as an argument to the callback function;
*/
IMPORT_C static TInt SetOutputState(TInt aId, TGpioState aState, TGpioCallback* aCb);