Protocentral / protocentral_healthypi5_zephyr

Main repository for the HealthyPi 5 Zephyr codebase
https://healthypi.protocentral.com/
Other
3 stars 4 forks source link

Fix CDC ACM ring buffer overflow #7

Closed borgmon closed 9 months ago

borgmon commented 9 months ago

Sometimes when connect to a host via usb serial, the ring buffer overflow and causes both host and hp5 to freeze.

This PR adds a check to rx throttle and prevents it from overflowing.

The method is directly from zephyr official guide https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/subsys/usb/cdc_acm/src/main.c

protocentralashwin commented 9 months ago

Thank you @borgmon for submitting our first PR ! I will review and merge this.