PDK API Guide for J721E
gpio.h File Reference

Introduction

File provides functional level API prototypes for GPIO interface.

Go to the source code of this file.

GPIO Interrupt mask

#define GPIO_INTR_MASK_NO_EDGE   (0x01U)
 
#define GPIO_INTR_MASK_RISE_EDGE   (0x02U)
 
#define GPIO_INTR_MASK_FALL_EDGE   (0x04U)
 
#define GPIO_INTR_MASK_BOTH_EDGE   (0x08U)
 
typedef uint32_t gpioIntrMask_t
 Enumerates the possible GPIO interrupt generation events. More...
 

GPIO Direction

#define GPIO_DIRECTION_INPUT   (GPIO_OE_OUTPUTEN_N_DISABLED)
 
#define GPIO_DIRECTION_OUTPUT   (GPIO_OE_OUTPUTEN_N_ENABLED)
 
typedef uint32_t gpioDirection_t
 Enumerates the direction of GPIO pin. More...
 

Data Structures

struct  gpioContext_t
 Structure holding the GPIO context. More...
 

Macros

#define GPIO_PIN_LOW   (0x0U)
 GPIO pin is at logic low. More...
 
#define GPIO_PIN_HIGH   (0x1U)
 GPIO pin is at logic high. More...
 
#define GPIO_OE_OUTPUTEN_N_ENABLED   (0U)
 Macro to configure GPIO pin as output. More...
 
#define GPIO_OE_OUTPUTEN_N_DISABLED   (1U)
 Macro to configure GPIO pin as input. More...
 
#define GPIO_PIN_MASK_ALL   0xFF
 Mask for all pins of single gpio port. More...
 

Functions

void GPIOSetDirMode_v0 (uint32_t baseAddr, uint32_t pinNumber, uint32_t pinDirection)
 This API configures the direction of a specified GPIO pin as being either input or output. More...
 
void GPIOPinWrite_v0 (uint32_t baseAddr, uint32_t pinNumber, uint32_t pinValue)
 This API drives an output GPIO pin to a logic HIGH or a logic LOW state. More...
 
uint32_t GPIOPinRead_v0 (uint32_t baseAddr, uint32_t pinNumber)
 This API determines the logic level(value) on a specified GPIO pin. More...
 
uint32_t GPIOPinOutValueRead_v0 (uint32_t baseAddr, uint32_t pinNumber)
 This API determines the output logic level(value) on a specified GPIO pin. More...
 
void GPIOSetIntrType_v0 (uint32_t baseAddr, uint32_t pinNumber, uint32_t eventType)
 This API configures the event type for a specified input GPIO pin. Whenever the selected event occurs on that GPIO pin and if interrupt generation is enabled for that pin, the GPIO module will send an interrupt to CPU. More...
 
void GPIOIntrEnable_v0 (uint32_t baseAddr, uint32_t pinNumber, uint32_t eventType)
 This API enables the configured interrupt event on a specified input GPIO pin to trigger an interrupt request. More...
 
void GPIOIntrDisable_v0 (uint32_t baseAddr, uint32_t pinNumber)
 This API disables interrupt generation due to the detection of any event on a specified input GPIO pin. More...
 
uint32_t GPIOIntrStatus_v0 (uint32_t baseAddr, uint32_t pinNumber)
 This API determines the enabled interrupt status of a specified pin. More...
 
void GPIOIntrStatusMask_v0 (uint32_t baseAddr, uint32_t bankIdx, uint32_t *intrStatusMask)
 This API determines the enabled interrupt status of a specified pin. More...
 
void GPIOIntrClear_v0 (uint32_t baseAddr, uint32_t pinNumber)
 This API clears the enabled interrupt status of a specified GPIO pin. More...
 
void GPIOIntrClearMask_v0 (uint32_t baseAddr, uint32_t bankIdx, uint32_t pinMask)
 This API clears the enabled interrupt status of specified GPIO pins. More...