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
This commit is contained in:
@@ -88,6 +88,10 @@ bool watch_is_usb_enabled(void);
|
||||
*/
|
||||
void watch_reset_to_bootloader(void);
|
||||
|
||||
/** @brief Call periodically from app main loop to service CDC RX/TX.
|
||||
*/
|
||||
void cdc_task(void);
|
||||
|
||||
/** @brief Reads up to len bytes from the USB serial.
|
||||
* @param file ignored, you can pass in 0
|
||||
* @param ptr pointer to a buffer of at least len bytes
|
||||
|
||||
@@ -38,14 +38,19 @@ void _watch_enable_tcc(void);
|
||||
/// Called by buzzer and LED teardown functions. You should not call this from your app.
|
||||
void _watch_disable_tcc(void);
|
||||
|
||||
/// Enable USB task timer. Called by USB enable routine in main(). You should not call this from your app.
|
||||
void _watch_enable_tc0(void);
|
||||
|
||||
/// Disable USB task timer. You should not call this from your app.
|
||||
void _watch_disable_tc0(void);
|
||||
|
||||
/// Enable CDC task timer. Called by USB enable routine in main(). You should not call this from your app.
|
||||
void _watch_enable_tc1(void);
|
||||
|
||||
/// Disable CDC task timer. You should not call this from your app.
|
||||
void _watch_disable_tc1(void);
|
||||
|
||||
/// Called by main.c if plugged in to USB. You should not call this from your app.
|
||||
void _watch_enable_usb(void);
|
||||
|
||||
// this function ends up getting called by printf to log stuff to the USB console.
|
||||
int _write(int file, char *ptr, int len);
|
||||
|
||||
// i thought this would be called by gets but it doesn't? anyway it does get called by read()
|
||||
// so that's our mechanism for reading data from the USB serial console.
|
||||
int _read(int file, char *ptr, int len);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user