1 / 8

Events and Interrupts

Events and Interrupts. Overview. What is an Event? Examples of Events Polling Interrupts Sample Timer I nterrupt example. What is an Event?.

colby
Download Presentation

Events and Interrupts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Events and Interrupts

  2. Overview • What is an Event? • Examples of Events • Polling • Interrupts • Sample Timer Interrupt example

  3. What is an Event? • Wikipedia: In computing an event is an action that is usually initiated outside the scope of a program and that is handled by a piece of code inside the program.

  4. Examples of Events • Timer Elapses • User input (Mouse/Keyboard) • Segmentation Fault

  5. Polling • Wikipedia: Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity.

  6. Interrupts • Wikipedia: In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.

  7. Sample Timer Interrupt • We will need to use <interrupt.h> • We need to catch if an invalid interrupt happens • We need to handle the correct interrupts • We will make lights blink.

  8. Things to remember • Use polling when you can. • Use interrupts when you need.

More Related