This makes movement_play_signal synchronous when in LE mode, despite
using the underlying asynchronous API. It's a bit of a hack, but it
should work well enough for now.
This also moves the enabling/disabling of the buzzer into the
movement_play_signal function, so that watch faces no longer have to do
it.
* Introduce shell module for basic serial shell with argument parsing
* Introduce shell_cmd_list module for basic compile-time command
registration
* Harden USB handling to hang less and drop fewer inputs
- Service tud_task() with periodic TC0 timer interrupt
- Service cdc_task() with periodic TC1 timer interrupt
- Handle shell servicing in main app loop
- Add a circular buffering layer for reads/writes
* Change newline prints to also send carriage return
* Refactor filesystem commands for shell subsystem
* Introduce new shell commands:
- 'help' command
- 'flash' command to reset into bootloader
- 'stress' command to stress CDC writes
Testing:
* Shell validated on Sensor Watch Blue w/ Linux host
* Shell validated in emscripten emulator
* Tuned by spamming inputs during `stress` cmd until stack didn't crash
* Move from .c to .h as needed for consistency.
* When missing from both, copy from pull request or wiki.
* When missing entirely, infer functionality from source code.
This allows the alarm button to be held down in the date settings and
quickly cycle through the dates instead of having to push for each
single increment like in other faces.
This is a matter of personal preference, but "instant" is the behaviour
of the original watch, and seems like the thing more people would
expect. Feel free not to take this commit if you disagree, though.
This illuminates the LED only for the time that the button is pressed,
and turns it off as soon as it's released, which is the behaviour of the
original watch.
I chose a led_duration of zero to represent "instant" and all bits set
to represent "no LED", which is arbitrary but seemed more sensible to
me.