TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _EMBEDDED_GPIO_PPI |
Macros | |
#define | GPIO(Port, Pin) ((EMBEDDED_GPIO_PIN)(((Port) << (16)) | (Pin))) |
#define | GPIO_PIN(x) ((EMBEDDED_GPIO_PIN)(x) & (0xFFFF)) |
#define | GPIO_PORT(x) ((EMBEDDED_GPIO_PIN)(x) >> (16)) |
Typedefs | |
typedef struct _EMBEDDED_GPIO_PPI | EMBEDDED_GPIO_PPI |
typedef UINTN | EMBEDDED_GPIO_PIN |
typedef EFI_STATUS(EFIAPI * | EMBEDDED_GPIO_GET) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, OUT UINTN *Value) |
typedef EFI_STATUS(EFIAPI * | EMBEDDED_GPIO_SET) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_MODE Mode) |
typedef EFI_STATUS(EFIAPI * | EMBEDDED_GPIO_GET_MODE) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, OUT EMBEDDED_GPIO_MODE *Mode) |
typedef EFI_STATUS(EFIAPI * | EMBEDDED_GPIO_SET_PULL) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_PULL Direction) |
Variables | |
EFI_GUID | gEmbeddedGpioPpiGuid |
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
Copyright (c) 2017, Linaro, Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EmbeddedGpio.h.
#define GPIO | ( | Port, | |
Pin | |||
) | ((EMBEDDED_GPIO_PIN)(((Port) << (16)) | (Pin))) |
Definition at line 23 of file EmbeddedGpio.h.
#define GPIO_PIN | ( | x | ) | ((EMBEDDED_GPIO_PIN)(x) & (0xFFFF)) |
Definition at line 24 of file EmbeddedGpio.h.
#define GPIO_PORT | ( | x | ) | ((EMBEDDED_GPIO_PIN)(x) >> (16)) |
Definition at line 25 of file EmbeddedGpio.h.
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_GET) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, OUT UINTN *Value) |
Gets the state of a GPIO pin
This | Pointer to protocol |
Gpio | Which pin to read |
Value | State of the pin |
EFI_SUCCESS | GPIO state returned in Value |
EFI_INVALID_PARAMETER | Value is NULL |
EFI_NOT_FOUND | Pin does not exit |
Definition at line 63 of file EmbeddedGpio.h.
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_GET_MODE) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, OUT EMBEDDED_GPIO_MODE *Mode) |
Gets the mode (function) of a GPIO pin
This | Pointer to protocol |
Gpio | Which pin |
Mode | Pointer to output mode value |
EFI_SUCCESS | Mode value retrieved |
EFI_INVALID_PARAMETER | Mode is NULL |
EFI_NOT_FOUND | Pin does not exit |
Definition at line 105 of file EmbeddedGpio.h.
typedef UINTN EMBEDDED_GPIO_PIN |
Definition at line 21 of file EmbeddedGpio.h.
typedef struct _EMBEDDED_GPIO_PPI EMBEDDED_GPIO_PPI |
Definition at line 16 of file EmbeddedGpio.h.
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_SET) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_MODE Mode) |
Sets the state of a GPIO pin
This | Pointer to protocol |
Gpio | Which pin to modify |
Mode | Mode to set |
EFI_SUCCESS | GPIO set as requested |
EFI_INVALID_PARAMETER | Invalid mode |
EFI_NOT_FOUND | Pin does not exit |
Definition at line 84 of file EmbeddedGpio.h.
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_SET_PULL) (IN EMBEDDED_GPIO_PPI *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_PULL Direction) |
Sets the pull-up / pull-down resistor of a GPIO pin
This | Pointer to PPI |
Gpio | Port/pin index |
Pull | The pullup/pulldown mode to set |
EFI_SUCCESS | Mode was set |
EFI_NOT_FOUND | Pin does not exist |
EFI_UNSUPPORTED | Action not supported |
Definition at line 126 of file EmbeddedGpio.h.
enum EMBEDDED_GPIO_MODE |
Definition at line 27 of file EmbeddedGpio.h.
enum EMBEDDED_GPIO_PULL |
Definition at line 39 of file EmbeddedGpio.h.