i2s_test: add unity signal for synchronization

This commit is contained in:
laokaiyao
2022-11-29 11:43:37 +08:00
parent 371a6abdca
commit cd5f2c3d76
6 changed files with 82 additions and 74 deletions

View File

@@ -419,9 +419,12 @@ finish:
*/
static inline void i2s_ll_tx_start(i2s_dev_t *hw)
{
hw->tx_conf.tx_update = 0;
// TODO: solve the bug that can't update
// hw->tx_conf.tx_update = 0;
while (hw->tx_conf.tx_update);
hw->tx_conf.tx_update = 1;
hw->tx_conf.tx_start = 1;
while (hw->tx_conf.tx_update);
}
/**
@@ -431,9 +434,12 @@ static inline void i2s_ll_tx_start(i2s_dev_t *hw)
*/
static inline void i2s_ll_rx_start(i2s_dev_t *hw)
{
hw->rx_conf.rx_update = 0;
// TODO: solve the bug that can't update
// hw->rx_conf.rx_update = 0;
while (hw->rx_conf.rx_update);
hw->rx_conf.rx_update = 1;
hw->rx_conf.rx_start = 1;
while (hw->rx_conf.rx_update);
}
/**