File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -666,7 +666,7 @@ static int cdc_acm_irq_rx_ready(const struct device *dev)
666
666
{
667
667
struct cdc_acm_dev_data_t * const dev_data = dev -> data ;
668
668
669
- if (dev_data -> rx_ready ) {
669
+ if (dev_data -> rx_ready && dev_data -> rx_irq_ena ) {
670
670
return 1 ;
671
671
}
672
672
@@ -682,15 +682,11 @@ static int cdc_acm_irq_rx_ready(const struct device *dev)
682
682
*/
683
683
static int cdc_acm_irq_is_pending (const struct device * dev )
684
684
{
685
- struct cdc_acm_dev_data_t * const dev_data = dev -> data ;
686
-
687
- if (dev_data -> tx_ready && dev_data -> tx_irq_ena ) {
685
+ if (cdc_acm_irq_rx_ready (dev ) || cdc_acm_irq_tx_ready (dev )) {
688
686
return 1 ;
689
- } else if (dev_data -> rx_ready && dev_data -> rx_irq_ena ) {
690
- return 1 ;
691
- } else {
692
- return 0 ;
693
687
}
688
+
689
+ return 0 ;
694
690
}
695
691
696
692
/**
You can’t perform that action at this time.
0 commit comments