* libs: core: move pin definitions to header file
We need to use pin definitions elsewhere, so move the pin definitions
out into their own header file.
Signed-off-by: Sean Cross <sean@xobs.io>
* libs: core: add basic input sensing
This adds basic input sensing, which will be used for callbacks and
event handling.
Signed-off-by: Sean Cross <sean@xobs.io>
* libs: core: fix input event support
This fixes input event support.
Rather than using an interrupt, we simply spawn a thread and monitor the
required pins. This uses up a bit more processing power and isn't quite
as responsive as interrupt handling. However, it means we can do
debounce filtering, and we don't have to worry about the small interrupt
context stack size.
Signed-off-by: Sean Cross <sean@xobs.io>
* Added simulator support for sensing events. Moved the blocks under the sensing category.
* Move events into a single block.
* Use pin number rather than digital pin
* libs: core: change input from HIGH/LOW to RISING/FALLING
These values were designed to mimic interrupt types. They were
erronously defined as level-based, when really they're edge-based. I.e.
the event will fire on the high-to-low event (falling) rather than when
the event is low.
Rename HIGH to RISING, and LOW to FALLING, to better reflect this.
Signed-off-by: Sean Cross <sean@xobs.io>
* libs: core: input: correct comment GND -> +3.3V pin
We support resistive touch when also touching the +3.3V pin, unlike
other platforms that require you to touch GND.
Update the comment to reflect this, so that it will be propagated to the
documentation.
Signed-off-by: Sean Cross <sean@xobs.io>
* libs: core: commit auto-generated strings
These strings were regenerated as a result of the previous patch.
Signed-off-by: Sean Cross <sean@xobs.io>