David-OConnor / stm32-hal

This library provides access to STM32 peripherals in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IrDA support for USART peripherals

tim-seoss opened this issue · comments

Thanks for the work on stm32-hal...

I'm working on adding IrDA SIR support for the stm32f4xx-hal currently - would you be interested in adding the same support to this project? A very-draft PR is here: stm32-rs/stm32f4xx-hal#466 any comments would be welcome.

Definitely. I'll take a look later this week.

In latest commit. I used your cfg enum; works well with the idioms I use in this lib. Untested, and I've never used IrDA. This should probably work (It's straight out of the RM, and consistent with your PR in the other repo), but I didn't understand the part about baud rate cfg you set up. (LMK if that needs to be addressed. Happy to merge a PR, or C+P a code snippet here)

https://github.com/David-OConnor/stm32-hal/blob/main/src/usart.rs#L232

Cool, thanks. If it's OK with you I'll try and get the other PR mostly straightened out first (I've got some doubt about IrDA low power mode on UART peripherals - possibly this functionality is missing for UARTs), and then come back to this?

Closing for now, since the bulk of the functionality is now included. Feel free to open another issue/PR if you want to add the baud rate cfg.

Thanks. BTW the stm32f4xx PR referenced above is currently blocked on this peripheral access crate PR: stm32-rs/stm32-rs#711