embassy
embassy copied to clipboard
Implement support for LPUART
Have tested this with BufferedUart, seems to work well. I have not tested uart v1. Creating this PR now to allow for discussion on whether or not this is the best way to do it.
Approach LGTM, very nice! :+1:
Have you checked the version of UART and LPUART matches in all chips? ie there's no chip with LPUARTv1 and UARTv2. This would be a crime from ST's part, but they like committing crimes, so it's worth checking...
Have you checked the version of UART and LPUART matches in all chips?
I haven't, how would I go about searching through all the files to check this?
manually :smiling_face_with_tear: ... Checking one chip per family should be safe enough.
Ah dear, already found an example of a chip (STM32L4A6) that has a v1 LPUART but a v2 USART... 🙃
Where do we go from here?
Main difference between a v1 and v2 LPUART seems to be:
- support for (TX & RX) FIFO
- prescaler
Seems to me that a mixed version case should be fine. The chip previously mentioned compiles fine. @Dirbaio thoughts?
@FrozenDroid if it builds and works then LGTM! :)
could you rustfmt so the CI passes?
I've been asked to take over here, but I'm not sure how to properly resolve the conflicts. Apparently this is a PR from our master branch, which also seems to have other work on it. Should I open a new PR from a dedicated branch, with just the LPUART commits, rebased on current upstream master?
yes! there should be no unrelated commits. If you have to open a new PR then so be it :)