Northeastern-Electric-Racing / Cerberus

Our FreeRTOS-based vehicle control application
1 stars 0 forks source link

Created a very basic task for handling outbound UART messages #66

Closed nwdepatie closed 11 months ago

nwdepatie commented 12 months ago

Just wanted to get this up to get thoughts on this. Basically this serves as a wrapper to printf that adds things into a queue to be sent out rather than directly calling printf. By only allowing 1 task to interface with printf (i.i. UART) we should be making the stream more reliable. Only thing is that the variadic function might take a second, and we need the queueing to happen super fast such to not obstruct any system processes.

Gotta think about this a bit more, this is linked to #28 as the actual ticket and is related to https://github.com/Northeastern-Electric-Racing/Cerberus/issues/32

nwdepatie commented 11 months ago

Note that I had to pull a _write function from here to get this to work: https://github.com/joeferner/stm32-utils/blob/master/syscalls.c

nwdepatie commented 11 months ago

Also the beauty of this is that you can run the regular serial command from the docker container that you would use to open a hardware port and it works the same, I'm routing the uart traffic to the same /dev/ttyACM0 file

nwdepatie commented 11 months ago

image