void GPIOPortIntUnregister(unsigned long ulPort) { // // Check the arguments. // ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) || (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) || (ulPort == GPIO_PORTE_BASE)); // // Get the interrupt number associated with the specified GPIO. // ulPort = GPIOGetIntNumber(ulPort); // // Disable the GPIO interrupt. // IntDisable(ulPort); // // Unregister the interrupt handler. // IntUnregister(ulPort); }
void GPIOPortIntRegister(unsigned long ulPort, void (*pfIntHandler)(void)) { // // Check the arguments. // ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) || (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) || (ulPort == GPIO_PORTE_BASE)); // // Get the interrupt number associated with the specified GPIO. // ulPort = GPIOGetIntNumber(ulPort); // // Register the interrupt handler. // IntRegister(ulPort, pfIntHandler); // // Enable the GPIO interrupt. // IntEnable(ulPort); }
//***************************************************************************** // //! Removes an interrupt handler for a GPIO port. //! //! \param ulPort is the base address of the GPIO port. //! //! This function will unregister the interrupt handler for the specified //! GPIO port. This function will also disable the corresponding //! GPIO port interrupt in the interrupt controller; individual GPIO interrupts //! and interrupt sources must be disabled with GPIOIntDisable(). //! //! \sa IntRegister() for important information about registering interrupt //! handlers. //! //! \return None. // //***************************************************************************** void GPIOIntUnregister(unsigned long ulPort) { // // Check the arguments. // ASSERT(GPIOBaseValid(ulPort)); // // Get the interrupt number associated with the specified GPIO. // ulPort = GPIOGetIntNumber(ulPort); // // Disable the GPIO interrupt. // IntDisable(ulPort); // // Unregister the interrupt handler. // IntUnregister(ulPort); }
//***************************************************************************** // //! Registers an interrupt handler for a GPIO port. //! //! \param ulPort is the base address of the GPIO port. //! \param pfnIntHandler is a pointer to the GPIO port interrupt handling //! function. //! //! This function will ensure that the interrupt handler specified by //! \e pfnIntHandler is called when an interrupt is detected from the selected //! GPIO port. This function will also enable the corresponding GPIO interrupt //! in the interrupt controller; individual pin interrupts and interrupt //! sources must be enabled with GPIOIntEnable(). //! //! \sa IntRegister() for important information about registering interrupt //! handlers. //! //! \return None. // //***************************************************************************** void GPIOIntRegister(unsigned long ulPort, void (*pfnIntHandler)(void)) { // // Check the arguments. // ASSERT(GPIOBaseValid(ulPort)); // // Get the interrupt number associated with the specified GPIO. // ulPort = GPIOGetIntNumber(ulPort); // // Register the interrupt handler. // IntRegister(ulPort, pfnIntHandler); // // Enable the GPIO interrupt. // IntEnable(ulPort); }