-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impl PeriAddress for I2sCore #683
Comments
( |
I think it was just missed when dual mode added. PRs are welcome. |
As I'm trying to make the PR, I realize an obstacle here is that
Wonder what is a good way forward? 🤔 |
I've made an attempt in #684. To get around the borrowing problem, I made an extension trait Example: use hal::i2s::{DualI2s, DualI2sDmaTargetExt};
let config = DualI2sDriverConfig::new_master()
.direction(Transmit, Receive)
.standard(Philips)
.data_format(Data16Channel16)
.master_clock(true)
.request_frequency(96_000);
let mut driver = config.dual_i2s_driver(peripheral);
driver.main().set_tx_dma(true);
driver.ext().set_rx_dma(true);
let i2s2_tx = Transfer::init_memory_to_peripheral(
dma1_streams.4,
driver.main().dma_target(),
i2s2_buf_tx,
None,
i2s_dma_config,
);
let i2s2_rx = Transfer::init_peripheral_to_memory(
dma1_streams.3,
driver.ext().dma_target(),
i2s2_buf_rx,
None,
i2s_dma_config,
); The trick is in the |
If this is a good way forward I'll write some more doc. |
@algesten: it's an omission, I find the current Transfer API is practically unusable for typical i2s usage or at least, it so much convenient to use Stream instead.
This is reasons of the '&mut' (and no '&')
|
Hi, I'm new to I2s, and I'm wondering what libraries on embedded system support stream. |
Hi!
I'm trying to use DMA transfer going with a
DualI2sDriver
. I seePeriAddress
is implemented forI2sDriver
, but not forI2SCore
(which you get in the dual case viaDualI2sDriver::main()
orDualI2sDriver::ext()
). Is this deliberate or an omissions?Happy to provide a PR if it should be implemented.
The text was updated successfully, but these errors were encountered: