IRQ event type. More...

Detailed Description

IRQ event type.

Handling an interrupt of a MCP23x17 expander requires direct access to the device by the driver over I2C/SPI within the ISR. However, the mutex based synchronization of I2C/SPI accesses does not work in the interrupt context. Accessing I2C/SPI within an ISR could therefore interfere with an existing I2C/SPI access. Therefore, the ISR must not access the MCP23x17 expander device. Rather, the ISR has only to indicate the occurrence of the interrupt. The interrupt is then handled asynchronously by a thread.

The type defines the data structure which is part of each device data structure to indicate that an interrupt for the device occurred. Since there is only one interrupt source, only one interrupt can be pending per device. Thus, only one object of this type per device is required.

Definition at line 504 of file mcp23x17.h.

#include <mcp23x17.h>

Data Fields

event_t event
 Super event data structure.
 
void * dev
 MCP23x17 device reference.
 

The documentation for this struct was generated from the following file: