//***************************************************************************** // //! Registers an interrupt handler for the synchronous serial interface. //! //! \param ulBase specifies the SSI module base address. //! \param pfnHandler is a pointer to the function to be called when the //! synchronous serial interface interrupt occurs. //! //! This function registers the handler to be called when an SSI interrupt //! occurs. This function enables the global interrupt in the interrupt //! controller; specific SSI interrupts must be enabled via SSIIntEnable(). If //! necessary, it is the interrupt handler's responsibility to clear the //! interrupt source via SSIIntClear(). //! //! \sa IntRegister() for important information about registering interrupt //! handlers. //! //! \return None. // //***************************************************************************** void SSIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) { unsigned long ulInt; // // Check the arguments. // ASSERT(SSIBaseValid(ulBase)); // // Determine the interrupt number based on the SSI port. // ulInt = SSIIntNumberGet(ulBase); // // Register the interrupt handler, returning an error if an error occurs. // IntRegister(ulInt, pfnHandler); // // Enable the synchronous serial interface interrupt. // IntEnable(ulInt); }
//***************************************************************************** // //! Unregisters an interrupt handler for the synchronous serial interface. //! //! \param ulBase specifies the SSI module base address. //! //! This function clears the handler to be called when an SSI interrupt //! occurs. This function also masks off the interrupt in the interrupt //! controller so that the interrupt handler no longer is called. //! //! \sa IntRegister() for important information about registering interrupt //! handlers. //! //! \return None. // //***************************************************************************** void SSIIntUnregister(unsigned long ulBase) { unsigned long ulInt; // // Check the arguments. // ASSERT(SSIBaseValid(ulBase)); // // Determine the interrupt number based on the SSI port. // ulInt = SSIIntNumberGet(ulBase); // // Disable the interrupt. // IntDisable(ulInt); // // Unregister the interrupt handler. // IntUnregister(ulInt); }
//***************************************************************************** // //! Unregisters an interrupt handler for the synchronous serial interface. //! //! \param ui32Base specifies the SSI module base address. //! //! This function clears the handler to be called when an SSI interrupt //! occurs. This function also masks off the interrupt in the interrupt //! controller so that the interrupt handler no longer is called. //! //! \sa IntRegister() for important information about registering interrupt //! handlers. //! //! \return None. // //***************************************************************************** void SSIIntUnregister(uint32_t ui32Base) { uint32_t ui32Int; // // Check the arguments. // ASSERT(SSIBaseValid(ui32Base)); // // Determine the interrupt number based on the SSI port. // ui32Int = SSIIntNumberGet(ui32Base); ASSERT(ui32Int != 0); // // Disable the interrupt. // IntDisable(ui32Int); // // Unregister the interrupt handler. // IntUnregister(ui32Int); }