simpler USB CDC with gossamer / yield (no need for TC0/TC1)

This commit is contained in:
joeycastillo
2024-09-18 17:14:06 -04:00
parent da11c14684
commit 422cea8ff6
8 changed files with 199 additions and 337 deletions

View File

@@ -85,18 +85,6 @@ void irq_handler_system(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
* @param len the number of bytes you wish to read, max 256.
* @return The number of bytes read, or zero if no bytes were read.
*/
int read(int file, char *ptr, int len);
/** @brief Disables the TRNG twice in order to work around silicon erratum 1.16.1.
* FIXME: find a better place for this, a couple of watch faces need it.
*/

View File

@@ -29,21 +29,6 @@
/// Called by main.c while setting up the app. You should not call this from your app.
void _watch_init(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);