Go to the source code of this file.
◆ MCP23008_GPIO_DESCRIPTION
| #define MCP23008_GPIO_DESCRIPTION "Microchip MCP23008 8-bit I/O Expander" |
Description of MCP23008 device.
MCP230XX specific constants
◆ MCP23017_GPIO_DESCRIPTION
| #define MCP23017_GPIO_DESCRIPTION "Microchip MCP23016 16-bit I/O Expander" |
Description of MCP23017 device.
◆ MCP23008_GPIO_MIN_PIN
◆ MCP23008_GPIO_MAX_PIN
◆ MCP23008_GPIO_PIN_COUNT
| #define MCP23008_GPIO_PIN_COUNT 8 |
◆ MCP23017_GPIO_MIN_PIN
◆ MCP23017_GPIO_MAX_PIN
◆ MCP23017_GPIO_PIN_COUNT
| #define MCP23017_GPIO_PIN_COUNT 16 |
◆ MCP230XX_GPIO_MAX_LEVEL
◆ MCP230XX_GPIO_MAX_PULL
◆ MCP230XX_GPIO_MIN_FUNCTION
◆ MCP230XX_GPIO_MAX_FUNCTION
◆ MCP230XX_CHIP_MCP23008
| #define MCP230XX_CHIP_MCP23008 0 |
◆ MCP230XX_CHIP_MCP23017
| #define MCP230XX_CHIP_MCP23017 1 |
◆ MCP230XX_I2C_RATE
| #define MCP230XX_I2C_RATE 400000 |
Default I2C clock rate (Device supports 100KHz, 400KHz and 1.7MHz.
MCP230XX I2C constants
◆ MCP23008_I2C_SIZE
| #define MCP23008_I2C_SIZE 1 |
Number of bytes to read/write all pin values for any register.
◆ MCP23017_I2C_SIZE
| #define MCP23017_I2C_SIZE 2 |
Number of bytes to read/write all pin values for any register.
◆ MCP230XX_I2C_MAX_SIZE
| #define MCP230XX_I2C_MAX_SIZE 2 |
Maximum number of bytes to read/write all pin values for any register.
◆ MCP23008_I2C_MAX_REG
| #define MCP23008_I2C_MAX_REG 0x0A |
Maximum register address for the I2C interface.
◆ MCP23017_I2C_MAX_REG
| #define MCP23017_I2C_MAX_REG 0x1A |
Maximum register address for the I2C interface (Only 21 (0x15) registers exists, mappings differ between modes).
◆ MCP230XXGPIO
◆ mcp23008_gpio_create()
Create, register and start a new MCP23008 GPIO device connected to the specified I2C device.
MCP230XX Functions
- Parameters
-
| I2C | The I2C device this MCP23008 is connected to |
| Address | The I2C address for this MCP23008 |
- Returns
- Pointer to the new GPIO device or nil on failure
◆ mcp23017_gpio_create()
Create, register and start a new MCP23017 GPIO device connected to the specified I2C device.
- Parameters
-
| I2C | The I2C device this MCP23017 is connected to |
| Address | The I2C address for this MCP23017 |
- Returns
- Pointer to the new GPIO device or nil on failure
◆ mcp230xx_gpio_destroy()
Stop, deregister and destroy an MCP230XX GPIO device created by this driver.
- Parameters
-
| GPIO | The GPIO device to destroy |
- Returns
- ERROR_SUCCESS if completed or another error code on failure