30 memset(reg, 0,
sizeof(reg));
35 if (res !=
sizeof(reg) + 1)
return (
false);
43 return (res ==
sizeof(config) + 1);
54 return (res ==
sizeof(
m_iodir) + 1);
65 return (res ==
sizeof(
m_gppu) + 1);
97 if (res !=
sizeof(
m_gpinten) + 1)
goto error;
99 if (res !=
sizeof(
m_defval) + 1)
goto error;
101 if (res !=
sizeof(
m_intcon) + 1)
goto error;
126 if (
UNLIKELY(size == 0))
return (
true);
135 return (res == (
int) size);
146 return (res ==
sizeof(
m_olat) + 1);
152 if (
UNLIKELY(size == 0))
return (
true);
156 uint8_t* bp = (uint8_t*) buf;
157 size_t ix = size - 1;
160 return (res == (
int) size + 1);
bool pullup(uint8_t gppu)
Interrupt on change (toggle).
bool write(uint8_t value)
Interrupt Control Register.
Pull-up Resistor Configuration.
bool data_direction(uint8_t iodir)
bool interrupt_pin(uint8_t pin, InterruptMode mode)
int read(void *buf, size_t size)
int write(void *buf, size_t size)
Interrupt on falling (high to low).
Interrupt on Change Control Register.
void acquire(TWI::Driver *dev)
static const uint8_t PIN_MASK
Sequence Operation mode disable.
Default Compare Register.
Interrupt on rising (low to high).