Dear reader, please be warned as I'm about to take you on a journey that one really shouldn't have to embark on. The premise is simple, I want to send and read some data via UART (or commonly known as RS232/Serial comms).
This is pretty much your Embedded 101 task, and back in my day at University, this was something I'd bit-bang on a PIC mcu or rely on a hardware USART peripheral to get the job done. I wanted to do the same thing, in bare-metal Rust + Embassy.
Should be easy right?
Well, in all fairness, it takes about 2-3 minutes to download a simple Arduino "sketch" to do the same thing, and the code is quite succinct.
/*
* Serial echo for the Arduino Portenta H7
*
* This is a simple example, and can be cleaned up a lot more.
*
* Copyright (c) 2024 Michael de ...(continued)