46void printBinary(uint8_t port, uint32_t num,
int bits,
bool new_line =
false)
56 for (
int j = 0; j < bits; j++) {
60 binary[
i] = (num & 1) +
'0';
97 const uint8_t chip_address = XL9555_UNKNOWN_ADDRESS;
101 Serial.println(
"Failed to find XL9555 - check your wiring!");
127 for (;
i >= 0;
i--) {
129 Serial.print(
"GPIO: ");
130 Serial.print(15 -
i);
131 Serial.println(
" is low");
bool begin(SensorCommCustom::CustomCallback callback, uint8_t addr)
Initialize the sensor using custom callback interface.
void configPins(uint16_t pinMask, uint8_t mode)
Configure multiple pins as input or output simultaneously.
Concrete driver for the XL9555 16‑bit I2C GPIO expander.
uint16_t digitalReadPort() override
Read the values of all 16 input pins as a single 16-bit word.
void printBinary(uint8_t port, uint32_t num, int bits, bool new_line=false)
IoExpanderXL9555 expander