16 #include <adi_processor.h> 17 #include <adi_callback.h> 27 #pragma diag_suppress=Pm008,Pm011 35 #pragma diag_default=Pm008 46 #define ADI_GPIO_MEMORY_SIZE (16u) 90 #if defined(__ADUCM4x50__) 97 #define ADI_GPIO_PIN_0 ((ADI_GPIO_DATA)(0x0001)) 98 #define ADI_GPIO_PIN_1 ((ADI_GPIO_DATA)(0x0002)) 99 #define ADI_GPIO_PIN_2 ((ADI_GPIO_DATA)(0x0004)) 100 #define ADI_GPIO_PIN_3 ((ADI_GPIO_DATA)(0x0008)) 101 #define ADI_GPIO_PIN_4 ((ADI_GPIO_DATA)(0x0010)) 102 #define ADI_GPIO_PIN_5 ((ADI_GPIO_DATA)(0x0020)) 103 #define ADI_GPIO_PIN_6 ((ADI_GPIO_DATA)(0x0040)) 104 #define ADI_GPIO_PIN_7 ((ADI_GPIO_DATA)(0x0080)) 105 #define ADI_GPIO_PIN_8 ((ADI_GPIO_DATA)(0x0100)) 106 #define ADI_GPIO_PIN_9 ((ADI_GPIO_DATA)(0x0200)) 107 #define ADI_GPIO_PIN_10 ((ADI_GPIO_DATA)(0x0400)) 108 #define ADI_GPIO_PIN_11 ((ADI_GPIO_DATA)(0x0800)) 109 #define ADI_GPIO_PIN_12 ((ADI_GPIO_DATA)(0x1000)) 110 #define ADI_GPIO_PIN_13 ((ADI_GPIO_DATA)(0x2000)) 111 #define ADI_GPIO_PIN_14 ((ADI_GPIO_DATA)(0x4000)) 112 #define ADI_GPIO_PIN_15 ((ADI_GPIO_DATA)(0x8000)) 115 #define ADI_GPIO_PORT0_PIN_AVL (0xFFFFu) 116 #define ADI_GPIO_PORT1_PIN_AVL (0xFFFFu) 117 #define ADI_GPIO_PORT2_PIN_AVL (0xFFFFu) 119 #if defined(__ADUCM4x50__) 120 #define ADI_GPIO_PORT3_PIN_AVL (0x000Fu) 143 #if defined (__ICCARM__) 144 #pragma diag_default=Pm011
ADI_GPIO_RESULT adi_gpio_GetOutputEnable(const ADI_GPIO_PORT Port, ADI_GPIO_DATA *const pValue)
Gets the Output Driver Status for GPIO Pin(s)
ADI_GPIO_IRQ_TRIGGER_CONDITION
ADI_GPIO_RESULT adi_gpio_GroupInterruptPolarityEnable(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins, const bool bFlag)
Determine if the interrupts are generated on the rising or falling edge of the corresponding GPIO pin...
ADI_GPIO_RESULT adi_gpio_SetData(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins)
Sets the logic level of all GPIO pins on the given port to a given logic level.
ADI_GPIO_RESULT adi_gpio_GetData(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins, uint16_t *const pValue)
Gets/Senses the input level of all GPIO Pins on the given port.
ADI_GPIO_RESULT adi_gpio_SetHigh(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins)
Sets the Given GPIO pin(s) to a Logical High Level.
ADI_GPIO_RESULT adi_gpio_SetLow(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins)
Sets the Given GPIO pin(s) to a Logical Low Level.
ADI_GPIO_RESULT adi_gpio_InputEnable(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins, const bool bFlag)
Enables/Disables the Input Drivers for GPIO Pin(s)
ADI_GPIO_RESULT adi_gpio_PullUpEnable(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins, const bool bFlag)
Enables/Disables the Pull-Up for GPIO Pin(s)
ADI_GPIO_RESULT adi_gpio_Init(void *const pMemory, uint32_t const MemorySize)
Initializes the GPIO functions.
ADI_GPIO_RESULT adi_gpio_Toggle(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins)
Toggles the Logical Level of the Given GPIO pin(s)
ADI_GPIO_RESULT adi_gpio_DriveStrengthEnable(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins, const bool bFlag)
Enables/Disables increased Drive Strength capability for GPIO Pin(s)
ADI_GPIO_RESULT adi_gpio_GetGroupInterruptPins(const ADI_GPIO_PORT Port, const ADI_GPIO_IRQ eIrq, ADI_GPIO_DATA *const pValue)
Get a port's pin interrupt Group A/B mask register.
ADI_GPIO_RESULT adi_gpio_GetOutputData(const ADI_GPIO_PORT Port, ADI_GPIO_DATA *const pValue)
Gets the Output Level of all GPIO Pins on a given port.
ADI_GPIO_RESULT adi_gpio_UnInit(void)
Un-initialize the GPIO driver.
ADI_GPIO_RESULT adi_gpio_OutputEnable(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins, const bool bFlag)
Enables/Disables the Output Drivers for GPIO Pin(s)
ADI_GPIO_RESULT adi_gpio_SetGroupInterruptPolarity(const ADI_GPIO_PORT Port, const ADI_GPIO_DATA Pins)
Set/clear the interrupt polarity for the given pins.
ADI_GPIO_RESULT adi_gpio_GetGroupInterruptPolarity(const ADI_GPIO_PORT Port, ADI_GPIO_DATA *const pValue)
Get a port's pin interrupt polarity register.
ADI_GPIO_RESULT adi_gpio_SetGroupInterruptPins(const ADI_GPIO_PORT Port, const ADI_GPIO_IRQ eIrq, const ADI_GPIO_DATA Pins)
Group the pins for the given group interrupt.
ADI_GPIO_RESULT adi_gpio_RegisterCallback(const ADI_GPIO_IRQ eIrq, ADI_CALLBACK const pfCallback, void *const pCBParam)
Register or unregister an application callback function for group (A/B) interrupts.