Interrupt Service Routine (ISR)

In our example above, the function serint() is the ISR.

In general, an ISR is responsible for:

Depending on the complexity of the hardware device, the ISR, and the application, some of the above steps may be omitted.

Note: It isn't safe to use floating-point operations in Interrupt Service Routines.

Let's take a look at these steps in turn.