Provides a summary of GPIO platform service class and functions.
The General Purpose Input Output (GPIO) platform service is provided
by the GPIO
class.
API | Description |
---|---|
GPIO::SetOutputState(TInt aId, TGpioState aState) |
Set the output pin to one of the supported states described
in the TGpioState enumeration. Implement SetOutputState() function for each supported state synchronously.Return: |
GPIO::GetOutputState(TInt aId, TGpioState& aState) |
Get the current state of an output pin synchronously. Return: |
GPIO::GetInputState(TInt aId, TGpioState& aState) |
Get the current state of an input pin synchronously. Return: |
GPIO::GetInputState(TInt aId, TGpioCallback* aCb) |
Get the current state of an input pin asynchronously. The result
of the read operation and the state of the input pin will be passed
as an argument to the callback function. This API should be used with
off-chip GPIO modules only. Return: |
API | Description |
---|---|
GPIO::SetPinMode(TInt aId, TGpioMode aMode) |
Set the pins in one of the modes described in the TGpioMode enumeration.Return: |
GPIO::GetPinMode(TInt aId, TGpioMode& aMode) |
Get the pin mode. Return: |
API | Description |
---|---|
GPIO::SetPinDirection(TInt aId, TGpioDirection aDirection) |
Set the direction of a pin. Return: |
GPIO::GetPinDirection(TInt aId, TGpioDirection&
aDirection) |
Get the direction of a pin. Return: |
API | Description |
---|---|
GPIO::SetPinBias(TInt aId, TGpioBias aBias) |
Set the bias on a pin. Return: |
GPIO::GetPinBias(TInt aId, TGpioBias& aBias) |
Get the bias on a pin. Return: |
API | Description |
---|---|
GPIO::SetPinIdleConfigurationAndState(TInt aId, TInt
aConf) |
Set the idle configuration and state of a pin. The pin configuration
is the same that the pin should have when setting the mode to EIdle and the state is the same as it should present when
setting the output state to EIdleState .Return: |
GPIO::GetPinIdleConfigurationAndState(TInt aId, TInt&
aConf) |
Get the idle configuration and the state of a pin. Return: |
API | Description |
---|---|
GPIO::BindInterrupt(TInt aId, TGpioIsr aIsr, TAny*
aPtr) |
Bind an interrupt ID with the interrupt service routine function. Return: |
GPIO::UnbindInterrupt(TInt aId) |
Unbind an interrupt ID from the interrupt service routine function. Return: |
GPIO::EnableInterrupt(TInt aId) |
Enable the interrupt on a specified pin. Return: |
GPIO::DisableInterrupt(TInt aId) |
Disable the interrupt on a specified pin. Return: |
GPIO::IsInterruptEnabled(TInt aId, TBool& aEnable) |
Check if the interrupt is enabled on a specified pin. Return: |
GPIO::ClearInterrupt(TInt aId) |
Clear an interrupt on a specified pin. Return: |
GPIO::GetMaskedInterruptState(TInt aId, TBool&
aActive) |
Get the interrupt state using a mask as the output by the interrupt
controller. Return: |
GPIO::GetRawInterruptState(TInt aId, TBool& aActive) |
Get the interrupt state of a specified pin. Return: |
GPIO::SetInterruptTrigger(TInt aId, TGpioDetectionTrigger
aTrigger) |
Set the interrupt trigger on a specified pin. Return: |
API | Description |
---|---|
GPIO::EnableWakeup(TInt aId) |
Enable the wakeup function on a specified pin. Return: |
GPIO::DisableWakeup(TInt aId) |
Disable wakeup on a specified pin. Return: |
GPIO::IsWakeupEnabled(TInt aId, TBool& aEnable) |
Check if wakeup is enabled on a specified pin. Return: |
GPIO::SetWakeupTrigger(TInt aId, TGpioDetectionTrigger
aTrigger) |
Set the wakeup trigger on a specified pin. Return: |
API | Description |
---|---|
GPIO::SetDebounceTime(TInt aId, TInt aTime) |
Set the debouncing time on a specified pin. Return: |
GPIO::GetDebounceTime(TInt aId, TInt& aTime) |
Get the debouncing time on a specified pin. Return: |
The header file for the GPIO can be located here.