21 #ifndef COSA_MCP23008_HH 22 #define COSA_MCP23008_HH 58 } __attribute__((packed));
103 __attribute__((always_inline))
114 __attribute__((always_inline))
134 __attribute__((always_inline))
145 __attribute__((always_inline))
158 __attribute__((always_inline))
181 bool read(
void* buf,
size_t size);
189 bool write(uint8_t value);
199 bool write(
void* buf,
size_t size);
222 } __attribute__((packed));
231 } __attribute__((packed));
bool pullup(uint8_t gppu)
bool write_pin(uint8_t pin, uint8_t value)
bool input_pin(uint8_t pin)
static const uint8_t SUBADDR_MASK
Interrupt on change (toggle).
bool write(uint8_t value)
Hardware Address Enable (SPI).
Interrupt Control Register.
MCP23008(uint8_t subaddr=0)
Pull-up Resistor Configuration.
bool read_pin(uint8_t pin)
bool data_direction(uint8_t iodir)
bool interrupt_pin(uint8_t pin, InterruptMode mode)
Interrupt on falling (high to low).
Interrupt on Change Control Register.
Interrupt Capture Register.
Polarity of Interrupt Pin.
static const uint8_t PIN_MASK
Open-drain Output enable.
Sequence Operation mode disable.
Default Compare Register.
bool pullup_pin(uint8_t pin)
bool output_pin(uint8_t pin)
Interrupt on rising (low to high).