Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
Copyright (c) 2017, Linaro, Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
typedef EFI_STATUS |
( |
EFIAPI * |
EMBEDDED_GPIO_GET | ) |
|
Gets the state of a GPIO pin
- Parameters
-
This | Pointer to protocol |
Gpio | Which pin to read |
Value | State of the pin |
- Return values
-
EFI_SUCCESS | GPIO state returned in Value |
EFI_INVALID_PARAMETER | Value is NULL |
EFI_NOT_FOUND | Pin does not exit |
Sets the state of a GPIO pin
- Parameters
-
This | Pointer to protocol |
Gpio | Which pin to modify |
Mode | Mode to set |
- Return values
-
EFI_SUCCESS | GPIO set as requested |
EFI_INVALID_PARAMETER | Invalid mode |
EFI_NOT_FOUND | Pin does not exit |
Gets the mode (function) of a GPIO pin
- Parameters
-
This | Pointer to protocol |
Gpio | Which pin |
Mode | Pointer to output mode value |
- Return values
-
EFI_SUCCESS | Mode value retrieved |
EFI_INVALID_PARAMETER | Mode is NULL |
EFI_NOT_FOUND | Pin does not exit |
Sets the pull-up / pull-down resistor of a GPIO pin
- Parameters
-
This | Pointer to PPI |
Gpio | Port/pin index |
Pull | The pullup/pulldown mode to set |
- Return values
-
EFI_SUCCESS | Mode was set |
EFI_NOT_FOUND | Pin does not exist |
EFI_UNSUPPORTED | Action not supported |
Enable interrupt source Source.
- Parameters
-
This | Instance pointer for this protocol |
Source | Hardware source of the interrupt |
- Return values
-
EFI_SUCCESS | Source interrupt enabled. |
EFI_DEVICE_ERROR | Hardware could not be programmed. |
Disable interrupt source Source.
- Parameters
-
This | Instance pointer for this protocol |
Source | Hardware source of the interrupt |
- Return values
-
EFI_SUCCESS | Source interrupt disabled. |
EFI_DEVICE_ERROR | Hardware could not be programmed. |
Return current state of interrupt source Source.
- Parameters
-
This | Instance pointer for this protocol |
Source | Hardware source of the interrupt |
InterruptState | TRUE: source enabled, FALSE: source disabled. |
- Return values
-
EFI_SUCCESS | InterruptState is valid |
EFI_DEVICE_ERROR | InterruptState is not valid |
Signal to the hardware that the End Of Interrupt state has been reached.
- Parameters
-
This | Instance pointer for this protocol |
Source | Hardware source of the interrupt |
- Return values
-
EFI_SUCCESS | Source interrupt EOI'ed. |
EFI_DEVICE_ERROR | Hardware could not be programmed. |
Return the configured trigger type for an interrupt source
- Parameters
-
This | Instance pointer for this protocol |
Source | Hardware source of the interrupt |
TriggerType | The configured trigger type |
- Return values
-
EFI_SUCCESS | Operation successful |
EFI_DEVICE_ERROR | Information could not be returned |
Configure the trigger type for an interrupt source
- Parameters
-
This | Instance pointer for this protocol |
Source | Hardware source of the interrupt |
TriggerType | The trigger type to configure |
- Return values
-
EFI_SUCCESS | Operation successful |
EFI_DEVICE_ERROR | Hardware could not be programmed. |