modm-io / modm

modm: a C++23 library generator for AVR and ARM Cortex-M devices
https://modm.io
Mozilla Public License 2.0
746 stars 132 forks source link

BufferedUart template and its specialisation for FreeRTOS queues #1156

Closed kapacuk closed 3 months ago

kapacuk commented 5 months ago

As discussed in PR#1155, here is my attempt to create a wrapper around the UartHal driver which handles the buffering. Not sure if it's what you had in mind, I'm open to suggestions on how to improve it.

I kept the original buffering driver with minor tweaks and created a new templated class BufferedUart. It duplicates some code from the old driver, but I think that's a small price to pay for backward compatibility.

kapacuk commented 5 months ago

Sorry it took me so long, that was a bigger change than I expected.. I think I'm done, it's ready for a review.

salkinium commented 5 months ago

Sorry it took me so long

No pressure! I'm very happy with this work, thank you for taking this on! I will review and test this in depth on the weekend.