 This is also true of programming for device drivers (e.g., P in USB device driver stacks).In an event-driven application, there is generally a main loop that listens for events, and then triggers a callback function when one of those events is detected.In embedded systems, the same may be achieved using hardware interrupts instead of a constantly running main loop.