First page Back Continue Last page Overview Graphics
Handling the interrupt
A critical data structure called foo_dev includes the following main fields:
- A wait list head data structure where the process will wait waiting for the interrupt to occur
- An 8-bit field data where the data read from the device will be stored
- A sem semaphore to serialize accesses
foo_dev interfaces lp_sensor_read() with lp_sensor_interrupt()