The function is not used anymore, there's a different, better way to
hook into the event handler now.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This adds a new `handle_user_key_event` function, that will get called
before anything else, and can override what happens. If it returns true,
the event will not be processed further by the firmware. By default,
this function returns false, and is a no-op.
It is defined with a `weak` attribute, to let the linker know that any
other function with the same name should override his one. This makes it
possible to have another version of this function in a firmware Sketch,
and override the behaviour, to extend the event handling.
This is the foundation that allows it to use external libraries, and tap
into the firmware's event handler, to add new stuff. (We can already
hook into the main loop by changing the top `loop` function in the
Sketch)
This addresses #21 for the most part.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
HACK: Invert the order of "write to i2c" and "read from i2c" because we're
seeing a weird phantom issue where after writing LED data to the ATTiny,
and reading immediately, we get back its own address, a 0 byte and then
garbage
I2C,Setup Read to [0xB1] + ACK
I2C,0xB1 + ACK
I2C,0x00 + ACK
I2C,0xFF + ACK
I2C,0xFF + ACK
I2C,0xFF + NAK
It appears that this has ~nothing to do with the ATTiny's firmware,
but I've been wrong before