libmcp23016
1.1
Linux userspace driver for Microchip MCP23016 I/O expanders
|
int mcp23016_set_control(struct mcp23016_device *dev, uint16_t val)
Set the I/O control value.
void mcp23016_interrupt_close(struct mcp23016_interrupt *intr)
Close a MCP23016 interrupt handle and free associated memory.
Handle to a MCP23016 device.
int mcp23016_set_port(struct mcp23016_device *dev, uint16_t val)
Set the port value.
struct mcp23016_interrupt * mcp23016_interrupt_open(const char *path, unsigned int offset)
Open the MCP23016 interrupt specified by path and offset.
int mcp23016_set_polarity(struct mcp23016_device *dev, uint16_t val)
Set the input polarity value.
int mcp23016_has_interrupt(struct mcp23016_interrupt *intr)
Check interrupt output status.
int mcp23016_get_polarity(struct mcp23016_device *dev, uint16_t *val)
Get the input polarity value.
int mcp23016_get_port(struct mcp23016_device *dev, uint16_t *val)
Get the port value.
@ MCP23016_CONTROL_IARES_NORMAL
Definition: mcp23016.h:43
int mcp23016_reset(struct mcp23016_device *dev)
Issue a software reset, which resets registers to POR defaults and clears pending interrupts.
@ MCP23016_CONTROL_IARES_FAST
Definition: mcp23016.h:44
int mcp23016_get_direction(struct mcp23016_device *dev, uint16_t *val)
Get the I/O direction value.
struct mcp23016_device * mcp23016_open(const char *path, unsigned int num)
Open the MCP23016 device specified by path and num.
int mcp23016_set_direction(struct mcp23016_device *dev, uint16_t val)
Set the I/O direction value.
int mcp23016_get_output(struct mcp23016_device *dev, uint16_t *val)
Get the output latch value.
int mcp23016_get_interrupt(struct mcp23016_device *dev, uint16_t *val)
Get the interrupt capture value.
static int mcp23016_clear_interrupt(struct mcp23016_device *dev)
Clear interrupt status.
Definition: mcp23016.h:213
mcp23016_control
Enum that describes I/O control values.
Definition: mcp23016.h:42
Handle to a MCP23016 interrupt.
int mcp23016_set_output(struct mcp23016_device *dev, uint16_t val)
Set the output latch value.
void mcp23016_close(struct mcp23016_device *dev)
Close a MCP23016 device handle and free associated memory.
int mcp23016_get_control(struct mcp23016_device *dev, uint16_t *val)
Get the I/O control value.