summaryrefslogtreecommitdiff
path: root/src/class/cdc
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2022-12-16 17:05:25 +0700
committerGitHub <[email protected]>2022-12-16 17:05:25 +0700
commit159aa599be42534cd9a37ae03c71c228c3e72e90 (patch)
tree8848b3c218644e1bbf5419975efef52c52a27971 /src/class/cdc
parentab18b8794fa9834d5c9585f83addb24850601ec9 (diff)
parent1e99480ad28808a29938673d5b05d9461da5d1c1 (diff)
Merge pull request #1799 from hathach/update-osal-mutex
Update osal mutex
Diffstat (limited to 'src/class/cdc')
-rw-r--r--src/class/cdc/cdc_device.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c
index 7b1e08d5d..0bbbaaa83 100644
--- a/src/class/cdc/cdc_device.c
+++ b/src/class/cdc/cdc_device.c
@@ -62,10 +62,8 @@ typedef struct
uint8_t rx_ff_buf[CFG_TUD_CDC_RX_BUFSIZE];
uint8_t tx_ff_buf[CFG_TUD_CDC_TX_BUFSIZE];
-#if CFG_FIFO_MUTEX
- osal_mutex_def_t rx_ff_mutex;
- osal_mutex_def_t tx_ff_mutex;
-#endif
+ OSAL_MUTEX_DEF(rx_ff_mutex);
+ OSAL_MUTEX_DEF(tx_ff_mutex);
// Endpoint Transfer buffer
CFG_TUSB_MEM_ALIGN uint8_t epout_buf[CFG_TUD_CDC_EP_BUFSIZE];
@@ -248,10 +246,8 @@ void cdcd_init(void)
// In this way, the most current data is prioritized.
tu_fifo_config(&p_cdc->tx_ff, p_cdc->tx_ff_buf, TU_ARRAY_SIZE(p_cdc->tx_ff_buf), 1, true);
-#if CFG_FIFO_MUTEX
tu_fifo_config_mutex(&p_cdc->rx_ff, NULL, osal_mutex_create(&p_cdc->rx_ff_mutex));
tu_fifo_config_mutex(&p_cdc->tx_ff, osal_mutex_create(&p_cdc->tx_ff_mutex), NULL);
-#endif
}
}