Skip to content

Commit

Permalink
usb: class: cdc_acm: Add check for tx_irq_ena in tx_ready function
Browse files Browse the repository at this point in the history
cdc_acm_irq_tx_ready was not checking if its interrupt was enabled.
This causes spurious tx irq handler calls.

Signed-off-by: Eric Johnson <[email protected]>
  • Loading branch information
Eric Johnson authored and carlescufi committed Sep 1, 2021
1 parent e54d255 commit 20b710a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/usb/class/cdc_acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ static int cdc_acm_irq_tx_ready(const struct device *dev)
{
struct cdc_acm_dev_data_t * const dev_data = DEV_DATA(dev);

if (dev_data->tx_ready) {
if (dev_data->tx_irq_ena && dev_data->tx_ready) {
return 1;
}

Expand Down

0 comments on commit 20b710a

Please sign in to comment.