Extend FIFO mutex to use separate write and read mutexes.

Adjust all USB drivers using FIFO and mutexes.
This commit is contained in:
Reinhard Panhuber
2021-03-04 13:52:14 +01:00
parent 848e403e37
commit 7e56f46957
6 changed files with 80 additions and 53 deletions

View File

@@ -243,8 +243,8 @@ void cdcd_init(void)
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, osal_mutex_create(&p_cdc->rx_ff_mutex));
tu_fifo_config_mutex(&p_cdc->tx_ff, osal_mutex_create(&p_cdc->tx_ff_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
}
}