diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-660A8E4C-F930-415C-8CCC-CB1DCCAA2442.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-660A8E4C-F930-415C-8CCC-CB1DCCAA2442.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,37 @@ + + + + + +InterruptsThis document describes how device drivers use interrupts. +
+

Devices generate interrupts to indicate hardware events. Generally +drivers provide an interrupt service routine (ISR) to handle the interrupts +and perform the required responses to the events. Symbian provides an Interrupt class +(implemented by the ASSP) with an API to bind and unbind an interrupt source +and an ISR.

// Bind the interrupt source ID and interrupt service routine +TInt Bind(TInt aId, TIsr aIsr, TAny* aPtr); +// Unbind the interrupt +TInt Unbind(TInt aId); +// Enable interrupts on device interrupt source +TInt Enable(TInt aId); +// Disable interrupts on device interrupt source +TInt Disable(TInt aId); +// Clear the device interrupt +TInt Clear(TInt aId); +// Set the priority of the interrupt +TInt SetPriority(TInt aId, TInt aPriority);

Interrupt handling +is typically done in a PDD, as device hardware access is done at that level. +Interrupt handling is generally done in two stages in the driver. High priority +and short time running tasks are done in the ISR, and the remaining processing +is deferred for handling later.

Interrupt handling is a blocking high +priority task and needs to take a minimal amount of time. The Kernel will +be in an indeterminate state and puts restrictions on doing various operations.

+
+
\ No newline at end of file