![Logo](ti_logo.svg) |
AM273x MCU+ SDK
08.06.00
|
|
Go to the documentation of this file.
60 #include <drivers/hw_include/cslr.h>
61 #include <drivers/hw_include/cslr_gpio.h>
78 #define GPIO_PIN_LOW (0U)
80 #define GPIO_PIN_HIGH (1U)
89 #define GPIO_DIRECTION_OUTPUT (1U)
91 #define GPIO_DIRECTION_INPUT (0U)
100 #define GPIO_OPEN_DRAIN_ENABLE (1U)
102 #define GPIO_OPEN_DRAIN_DISABLE (0U)
111 #define GPIO_TRIG_TYPE_NONE (0U)
113 #define GPIO_TRIG_TYPE_RISE_EDGE (1U)
115 #define GPIO_TRIG_TYPE_FALL_EDGE (2U)
117 #define GPIO_TRIG_TYPE_BOTH_EDGE (3U)
126 #define GPIO_INTR_LEVEL_LOW (0U)
128 #define GPIO_INTR_LEVEL_HIGH (1U)
132 #define GPIO_MAX_PORT (8U)
139 #define GPIO_MAX_INTERRUPT_PORT (4U)
146 #define GPIO_MAX_PINS_PER_PORT (8U)
149 #define GPIO_MAX_PINS (GPIO_MAX_PORT * GPIO_MAX_PINS_PER_PORT)
158 #define GPIO_MAX_INTERRUPT (GPIO_MAX_INTERRUPT_PORT * GPIO_MAX_PINS_PER_PORT)
161 #define GPIO_GET_PIN_OFFSET(pinNum) (((uint32_t)pinNum) % (GPIO_MAX_PORT * GPIO_MAX_PINS_PER_PORT))
163 #define GPIO_GET_PORT_NUM(pinNum) ((GPIO_GET_PIN_OFFSET(pinNum)) / GPIO_MAX_PINS_PER_PORT)
165 #define GPIO_GET_PIN_INDEX(pinNum) ((GPIO_GET_PIN_OFFSET(pinNum)) % GPIO_MAX_PINS_PER_PORT)
void GPIO_pinWriteLow(uint32_t baseAddr, uint32_t pinNum)
The function is used to write logic LOW state to a specific GPIO Port/Pin.
int32_t GPIO_disableInterrupt(uint32_t baseAddr, uint32_t pinNum)
The function is used to disable the interrupt on the GPIO Pin.
int32_t GPIO_clearInterrupt(uint32_t baseAddr, uint32_t pinNum)
The function is used to clear the interrupt on the GPIO Pin.
void GPIO_pinWriteHigh(uint32_t baseAddr, uint32_t pinNum)
The function is used to write logic HIGH state to a to a specific GPIO Pin.
void GPIO_setDirMode(uint32_t baseAddr, uint32_t pinNum, uint32_t pinDir)
The function is used to set the output data direction associated with a GPIO Pin.
int32_t GPIO_enableInterrupt(uint32_t baseAddr, uint32_t pinNum)
The function is used to enable the interrupt on the GPIO Pin.
int32_t GPIO_setTrigType(uint32_t baseAddr, uint32_t pinNum, uint32_t polLevel)
The function is used to configure the GPIO Pin to control the interrupt polarity.
int32_t GPIO_ignoreOrHonorPolarity(uint32_t baseAddr, uint32_t pinNum, uint32_t polLevel)
The function is used to configure the GPIO Pin to ignore or honor polarity.
int32_t GPIO_markHighLowLevelInterrupt(uint32_t baseAddr, uint32_t pinNum, uint32_t interruptLevel)
The function is used to mark the interrupt as high level or low level for the specific GPIO Pin.
void GPIO_moduleEnable(uint32_t baseAddr)
This API performs the module enable of the GPIO module.
void GPIO_setOpenDrainStatus(uint32_t baseAddr, uint32_t pinNum, uint32_t openDrainStatus)
The function is used to enable/disable open drain functionality for a specific GPIO Port/Pin....
uint32_t GPIO_getHighLowLevelPendingInterrupt(uint32_t baseAddr, uint32_t interruptLevel)
The function is used to get the high level or low level interrupt pending. The driver will need to cy...
uint32_t GPIO_pinRead(uint32_t baseAddr, uint32_t pinNum)
The function is used to get the data input for a specific GPIO Port/Pin.