|
uint8_t | lookForDevice () |
| Look for MCP23008 device I2C Address. More...
|
|
void | reset () |
| Resets the MCP23008. More...
|
|
void | setup (uint8_t i2c=0x20, uint8_t io=GPIO_OUTPUT, int reset_pint=-1, long i2c_freq=100000) |
| Starts the MCP23008. More...
|
|
uint8_t | getRegister (uint8_t reg) |
| Gets the corrent register information. More...
|
|
void | setRegister (uint8_t reg, uint8_t value) |
| Sets a value to a given register. More...
|
|
void | turnGpioOn (uint8_t gpio) |
| Turns a given GPIO port on (high level) More...
|
|
void | turnGpioOff (uint8_t gpio) |
| Turns a given GPIO port off (low level) More...
|
|
void | pullUpGpioOn (uint8_t gpio) |
| Turns intenal pull up resistor ON to a given GPIO PIN (high level) More...
|
|
void | pullUpGpioOff (uint8_t gpio) |
| Turns intenal pull up resistor OFF to a given GPIO PIN (low level) More...
|
|
void | setIoCon (uint8_t INTPOL, uint8_t ODR, uint8_t HAEN, uint8_t DISSLW, uint8_t SEQOP) |
| Sets the IO Configurarion gerister. More...
|
|
mcp23008_ioncon | getIoCon () |
| Returns the IOCON content. More...
|
|
void | invertGpioPolarity () |
| Inverts the polarity of the all GPIO port bits. More...
|
|
void | setInterrupt (uint8_t polatity=0, uint8_t openDrainOutput=0) |
| Configures the MCP23008 interrupt feature. More...
|
|
void | interruptGpioOn (uint8_t gpio, uint8_t bitCompare=1) |
| Sets the interrupt-on-change feature to a given GPIO pin. More...
|
|
bool | gpioRead (uint8_t gpio) |
| Reads the status (high or low) of a given GPIO. More...
|
|
void | gpioWrite (uint8_t gpio, uint8_t value) |
| Sets a given value (high(1) or low(0) ) to a given gpio pin. More...
|
|
bool | registerDigitalRead (uint8_t mcp_register, uint8_t bit_position) |
| Reads the status (high or low) of a given bit (position) of a given MCP23008 register. More...
|
|
void | registerDigitalWrite (uint8_t mcp_register, uint8_t bit_position, uint8_t value) |
| Sets High or Low to a given position in a given MCP23008 register. More...
|
|
uint8_t | getGPIOS () |
| Returns the current MCP GPIO pin levels. More...
|
|
void | setGPIOS (uint8_t value) |
| Sets a value to the GPIO Register. More...
|
|
uint8_t | getINTCAP () |
| Returns the last value of INTCAP register (value immediately after the last interrupt event) More...
|
|
uint8_t | getINTF () |
| Returns the last value of INTF register. More...
|
|
bool | isBitValueHigh (uint8_t byteValue, uint8_t bitNumber) |
| Checks if the Bit Value of a given bit position is high. More...
|
|
void | setClock (long freq) |
| Sets I2C bus to a given frequency. More...
|
|