diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-01-02 11:43:13 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-01-02 11:43:13 +0000 |
commit | d5635adecc959228fefce27610f211087fefd87f (patch) | |
tree | da768fca6a17255b1d9b82fab19cc87e992340e3 /os/hal/src | |
parent | 60c04d66ec3c383febd9c9324e166aec2adb6e38 (diff) | |
download | ChibiOS-d5635adecc959228fefce27610f211087fefd87f.tar.gz ChibiOS-d5635adecc959228fefce27610f211087fefd87f.tar.bz2 ChibiOS-d5635adecc959228fefce27610f211087fefd87f.zip |
Mass update of all drivers to use the new DMA API. What could possibly go wrong?
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12521 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/hal_serial_usb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/src/hal_serial_usb.c b/os/hal/src/hal_serial_usb.c index 246360ebc..4932ccb3d 100644 --- a/os/hal/src/hal_serial_usb.c +++ b/os/hal/src/hal_serial_usb.c @@ -310,6 +310,10 @@ void sduStop(SerialUSBDriver *sdup) { */
void sduSuspendHookI(SerialUSBDriver *sdup) {
+ /* Avoiding events spam.*/
+ if(bqIsSuspendedX(&sdup->ibqueue) && bqIsSuspendedX(&sdup->obqueue)) {
+ return;
+ }
chnAddFlagsI(sdup, CHN_DISCONNECTED);
bqSuspendI(&sdup->ibqueue);
bqSuspendI(&sdup->obqueue);
|