TianoCore EDK2 master
Loading...
Searching...
No Matches
EmbeddedGpio.h File Reference

Go to the source code of this file.

Data Structures

struct  _EMBEDDED_GPIO
 
struct  _GPIO_CONTROLLER
 
struct  _PLATFORM_GPIO_CONTROLLER
 

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 EMBEDDED_GPIO
 
typedef UINTN EMBEDDED_GPIO_PIN
 
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_GET) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, OUT UINTN *Value)
 
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_SET) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_MODE Mode)
 
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_GET_MODE) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, OUT EMBEDDED_GPIO_MODE *Mode)
 
typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_SET_PULL) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_PULL Direction)
 
typedef struct _GPIO_CONTROLLER GPIO_CONTROLLER
 
typedef struct _PLATFORM_GPIO_CONTROLLER PLATFORM_GPIO_CONTROLLER
 

Enumerations

enum  EMBEDDED_GPIO_MODE {
  GPIO_MODE_INPUT = 0x00 , GPIO_MODE_OUTPUT_0 = 0x0E , GPIO_MODE_OUTPUT_1 = 0x0F , GPIO_MODE_SPECIAL_FUNCTION_2 = 0x02 ,
  GPIO_MODE_SPECIAL_FUNCTION_3 = 0x03 , GPIO_MODE_SPECIAL_FUNCTION_4 = 0x04 , GPIO_MODE_SPECIAL_FUNCTION_5 = 0x05 , GPIO_MODE_SPECIAL_FUNCTION_6 = 0x06 ,
  GPIO_MODE_SPECIAL_FUNCTION_7 = 0x07 , GPIO_MODE_INPUT = 0x00 , GPIO_MODE_OUTPUT_0 = 0x0E , GPIO_MODE_OUTPUT_1 = 0x0F ,
  GPIO_MODE_SPECIAL_FUNCTION_2 = 0x02 , GPIO_MODE_SPECIAL_FUNCTION_3 = 0x03 , GPIO_MODE_SPECIAL_FUNCTION_4 = 0x04 , GPIO_MODE_SPECIAL_FUNCTION_5 = 0x05 ,
  GPIO_MODE_SPECIAL_FUNCTION_6 = 0x06 , GPIO_MODE_SPECIAL_FUNCTION_7 = 0x07
}
 
enum  EMBEDDED_GPIO_PULL {
  GPIO_PULL_NONE , GPIO_PULL_UP , GPIO_PULL_DOWN , GPIO_PULL_NONE ,
  GPIO_PULL_UP , GPIO_PULL_DOWN
}
 

Variables

EFI_GUID gEmbeddedGpioProtocolGuid
 
EFI_GUID gPlatformGpioProtocolGuid
 

Detailed Description

Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file EmbeddedGpio.h.

Macro Definition Documentation

◆ GPIO

#define GPIO (   Port,
  Pin 
)    ((EMBEDDED_GPIO_PIN)(((Port) << (16)) | (Pin)))

Definition at line 22 of file EmbeddedGpio.h.

◆ GPIO_PIN

#define GPIO_PIN (   x)    ((EMBEDDED_GPIO_PIN)(x) & (0xFFFF))

Definition at line 23 of file EmbeddedGpio.h.

◆ GPIO_PORT

#define GPIO_PORT (   x)    ((EMBEDDED_GPIO_PIN)(x) >> (16))

Definition at line 24 of file EmbeddedGpio.h.

Typedef Documentation

◆ EMBEDDED_GPIO

typedef struct _EMBEDDED_GPIO EMBEDDED_GPIO

Definition at line 15 of file EmbeddedGpio.h.

◆ EMBEDDED_GPIO_GET

typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_GET) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, OUT UINTN *Value)

Definition at line 48 of file EmbeddedGpio.h.

◆ EMBEDDED_GPIO_GET_MODE

typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_GET_MODE) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, OUT EMBEDDED_GPIO_MODE *Mode)

Definition at line 100 of file EmbeddedGpio.h.

◆ EMBEDDED_GPIO_PIN

typedef UINTN EMBEDDED_GPIO_PIN

Definition at line 20 of file EmbeddedGpio.h.

◆ EMBEDDED_GPIO_SET

typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_SET) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_MODE Mode)

Definition at line 74 of file EmbeddedGpio.h.

◆ EMBEDDED_GPIO_SET_PULL

typedef EFI_STATUS(EFIAPI * EMBEDDED_GPIO_SET_PULL) (IN EMBEDDED_GPIO *This, IN EMBEDDED_GPIO_PIN Gpio, IN EMBEDDED_GPIO_PULL Direction)

Definition at line 126 of file EmbeddedGpio.h.

◆ GPIO_CONTROLLER

Definition at line 160 of file EmbeddedGpio.h.

◆ PLATFORM_GPIO_CONTROLLER

Definition at line 161 of file EmbeddedGpio.h.

Enumeration Type Documentation

◆ EMBEDDED_GPIO_MODE

enum EMBEDDED_GPIO_MODE

Definition at line 26 of file EmbeddedGpio.h.

◆ EMBEDDED_GPIO_PULL

enum EMBEDDED_GPIO_PULL

Definition at line 38 of file EmbeddedGpio.h.