libmcp23016  1.1
Linux userspace driver for Microchip MCP23016 I/O expanders
Data Structures | Functions
Interrupt Output

Interrupt output functions. More...

Data Structures

struct  mcp23016_interrupt
 Handle to a MCP23016 interrupt. More...
 

Functions

struct mcp23016_interruptmcp23016_interrupt_open (const char *path, unsigned int offset)
 Open the MCP23016 interrupt specified by path and offset. More...
 
void mcp23016_interrupt_close (struct mcp23016_interrupt *intr)
 Close a MCP23016 interrupt handle and free associated memory. More...
 
int mcp23016_has_interrupt (struct mcp23016_interrupt *intr)
 Check interrupt output status. More...
 

Detailed Description

Interrupt output functions.

These functions manage the interrupt output functionality of the MCP23016, which can be shared by multiple devices. Use of these functions is considered optional and is only required if the caller wishes to be notified of input state changes.

Function Documentation

◆ mcp23016_has_interrupt()

int mcp23016_has_interrupt ( struct mcp23016_interrupt intr)

Check interrupt output status.

Parameters
intrPointer to a MCP23016 interrupt handle.
Returns
Interrupt status (0 or 1) on success, or -1 on error with errno set appropriately.

◆ mcp23016_interrupt_close()

void mcp23016_interrupt_close ( struct mcp23016_interrupt intr)

Close a MCP23016 interrupt handle and free associated memory.

Parameters
intrPointer to a MCP23016 interrupt handle.

Once closed, interrupt is no longer valid for use.

◆ mcp23016_interrupt_open()

struct mcp23016_interrupt* mcp23016_interrupt_open ( const char *  path,
unsigned int  offset 
)

Open the MCP23016 interrupt specified by path and offset.

Parameters
pathPointer to a GPIO character device.
offsetGPIO line offset.
Returns
Pointer to a MCP23016 interrupt handle, or NULL on error with errno set appropriately.