16 Commits

Author SHA1 Message Date
Jose Castillo
d98d14d236
Add support for Sensor Watch Pro (#412)
* Sensor Watch Pro board definition

* Disable hot-plugging on SWCLK

* Add rainbow test

* Move interrupt mapping to board config

* New color definition for Pro boards in makefile
2024-07-06 11:07:02 -04:00
Matheus Afonso Martins Moreira
35c0a4be87 Merge branch 'usb-improvements' into advanced
- Change newline prints to also send carriage return
 - Introduce shell module for serial shell with argument parsing
 - Introduce shell command list for compile time command registration
 - Refactor file system commands for shell subsystem
 - Introduce new shell commands:
   - 'help' command
   - 'flash' command to reset into bootloader
   - 'stress' tests CDC serial writes of various lengths
     - optional delay parameter
 - Harden USB handling
   - Hangs less
   - Drops fewer inputs
 - Circular buffers for both reads and writes

Reported-by: Edward Shin <contact@edwardsh.in>
Tested-by: Edward Shin <contact@edwardsh.in>
Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Reviewed-by: James Haggerty <james@gruemail.com>
Reviewed-by: Wesley Aptekar-Cassels <me@wesleyac.com>
Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/344
2024-03-08 06:51:34 -03:00
Alex Maestas
83a0e4e992 annotate TRNG erratum, address review comment 2024-01-22 00:39:18 +00:00
Edward Shin
5b762d0168 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
2024-01-07 00:20:20 -05:00
Alex Maestas
93d7f38d67 fix simulator build by declaring Trng type as a void pointer 2023-12-17 22:40:04 +00:00
Alex Maestas
89e86fe629 work around silicon erratum in TRNG 2023-12-17 17:39:59 +00:00
joeycastillo
b399f4ca45 only include watch_main_loop.h in simulator builds 2022-10-11 22:06:02 -05:00
Joey Castillo
7fc4395298 add watch_reset_to_bootloader function (resolves #81) 2022-08-14 15:23:32 -05:00
Joey Castillo
22b1ac0283 simulator: add USB serial input field 2022-05-09 13:00:15 -04:00
Joey Castillo
661e2b6a73 add ability to read from USB serial 2022-05-08 20:19:20 -04:00
Joey Castillo
d4ebe64af0 add support for a small filesystem on the watch 2022-05-06 17:12:14 -04:00
Joey Castillo
15cbe09410 move pins.h include to watch.h 2022-02-17 11:59:19 -05:00
Joey Castillo
203850104d remove obsolete low battery check 2022-02-13 14:01:21 -05:00
Joey Castillo
14e4562b7a add SPI to the index 2022-01-27 10:51:15 -05:00
Joey Castillo
a11275d84c watch library: implement SPI 2022-01-26 21:33:05 -05:00
Alexsander Akers
b8de35658f
Sensor Watch Simulator (#35)
* Put something on screen

* Use the 32bit watch_date_time repr to pass from JS

* Implement periodic callbacks

* Clear display on enabling

* Hook up watch_set_led_color() to SVG (green-only)

* Make debug output full-width

* Remove default Emscripten canvas

* Implement sleep and button clicks

* Fix time zone conversion bug in beats-time app

* Clean up warnings

* Fix pin levels

* Set time zone to browser value (if available)

* Add basic backup data saving

* Silence format specifier warnings in both targets

* Remove unnecessary, copied files

* Use RTC pointer to clear callbacks (if available)

* Use preprocessor define to avoid hardcoding MOVEMENT_NUM_FACES

* Change each face to const preprocessor definition

* Remove Intl.DateTimeFormat usage

* Update shell.html title, header

* Add touch start/end event handlers on SVG buttons

* Update shell.html

* Update folder structure (shared, simulator, hardware under watch-library)

* Tease out shared components from watch_slcd

* Clean up simulator watch_slcd.c inline JS calls

* Fix missing newlines at end of file

* Add simulator warnings (except format, unused-paremter)

* Implement remaining watch_rtc functions

* Fix button bug on mouse down then drag out

* Implement remaining watch_slcd functions

* Link keyboard events to buttons (for keys A, L, M)

* Rewrite event handling (mouse, touch, keyboard) in C

* Set explicit text UTF-8 charset in shell.html

* Address PR comments

* Remove unused directories from include paths
2022-01-25 15:03:22 -05:00