golioth / ostentus

i2c controlled ePaper display for Golioth Reference Designs
Apache License 2.0
1 stars 0 forks source link

add direct LED control #4

Closed szczys closed 1 year ago

szczys commented 1 year ago

Passing LED commands from the Aludel to the Ostentus using the FIFO was causing a bottleneck when micropython was busy updating the ePaper. When Alduel wants to update LEDs it makes more sense to handle it immediately (very low overhead in flipping these bits).

This commit watches for the LED manipulation register addresses to come in via i2c and updates the LEDs accordingly without adding the messages to the fifo. The downside is that micropython is unaware that LED changes have happened. But it doesn't prevent micropython from controlling the LEDs either.

Signed-off-by: Mike Szczys mike@golioth.io