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

@@ -146,8 +146,8 @@ void vendord_init(void)
tu_fifo_config(&p_itf->tx_ff, p_itf->tx_ff_buf, CFG_TUD_VENDOR_TX_BUFSIZE, 1, false);
#if CFG_FIFO_MUTEX
tu_fifo_config_mutex(&p_itf->rx_ff, osal_mutex_create(&p_itf->rx_ff_mutex));
tu_fifo_config_mutex(&p_itf->tx_ff, osal_mutex_create(&p_itf->tx_ff_mutex));
tu_fifo_config_mutex(&p_itf->rx_ff, NULL, osal_mutex_create(&p_itf->rx_ff_mutex));
tu_fifo_config_mutex(&p_itf->tx_ff, osal_mutex_create(&p_itf->tx_ff_mutex), NULL);
#endif
}
}