]> git.earman.xyz Git - sensor-watch.git/commit
USB Improvements
authorEdward Shin <contact@edwardsh.in>
Sun, 15 Oct 2023 04:36:49 +0000 (00:36 -0400)
committerEdward Shin <contact@edwardsh.in>
Sun, 7 Jan 2024 05:20:20 +0000 (00:20 -0500)
commit5b762d016841acb3cefa60f05e963711f0a3eb2b
tree8bea5eb0443df8cbe9cd2e402d2df8dfe7445b0b
parent63d6bc6aa0ddf4cc1ce1918ef7650852a25e581b
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
15 files changed:
make.mk
movement/filesystem.c
movement/filesystem.h
movement/make/Makefile
movement/movement.c
movement/shell.c [new file with mode: 0644]
movement/shell.h [new file with mode: 0644]
movement/shell_cmd_list.c [new file with mode: 0644]
movement/shell_cmd_list.h [new file with mode: 0644]
watch-library/hardware/main.c
watch-library/hardware/watch/watch_private.c
watch-library/hardware/watch/watch_private_cdc.c [new file with mode: 0644]
watch-library/hardware/watch/watch_private_cdc.h [new file with mode: 0644]
watch-library/shared/watch/watch.h
watch-library/shared/watch/watch_private.h