summaryrefslogtreecommitdiffstats
path: root/watch-library/hardware/main.c
diff options
context:
space:
mode:
authorEdward Shin <contact@edwardsh.in>2023-10-15 00:36:49 -0400
committerEdward Shin <contact@edwardsh.in>2024-01-07 00:20:20 -0500
commit5b762d016841acb3cefa60f05e963711f0a3eb2b (patch)
tree8bea5eb0443df8cbe9cd2e402d2df8dfe7445b0b /watch-library/hardware/main.c
parent63d6bc6aa0ddf4cc1ce1918ef7650852a25e581b (diff)
downloadSensor-Watch-5b762d016841acb3cefa60f05e963711f0a3eb2b.tar.gz
Sensor-Watch-5b762d016841acb3cefa60f05e963711f0a3eb2b.tar.bz2
Sensor-Watch-5b762d016841acb3cefa60f05e963711f0a3eb2b.zip
USB Improvements
* 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
Diffstat (limited to 'watch-library/hardware/main.c')
-rwxr-xr-xwatch-library/hardware/main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/watch-library/hardware/main.c b/watch-library/hardware/main.c
index 325610f6..8ac4fca6 100755
--- a/watch-library/hardware/main.c
+++ b/watch-library/hardware/main.c
@@ -79,7 +79,6 @@ int main(void) {
while (1) {
bool usb_enabled = hri_usbdevice_get_CTRLA_ENABLE_bit(USB);
bool can_sleep = app_loop();
-
if (can_sleep && !usb_enabled) {
app_prepare_for_standby();
sleep(4);