44 fprintf(stderr,
"Unable to open I2C bus: %s\n", strerror(errno));
51 for (
int j = 0; j < 18; ++j) {
52 for (
int i = 0; i < 18; ++i) {
57 fprintf(stderr,
"Unable to update state (LED %02d)\n", j + 1);
int i2c_openConnection(const char *bus)
Set up a connection to the specified bus.
void i2c_closeConnection(int handle)
Close existing connection.
bool i2c_sn3218_update(const int busHandle, const i2c_sn3218_state *state)
Configure SN3218 chip to match state object.
SN3218 State representation.
uint8_t led[18]
Individual LED brightnesses.
bool global_enable
Global on/off switch.