Closed acpie360 closed 1 year ago
The circular buffer code was written as "single producer, single consumer" and it should be safe to write to the cbuf from a UART interrupt, even if you're interrupting a read from the cbuf. If you're still unsure, you can review that code to confirm that a change to the head pointer mid-read is still safe.
If I use the xbee_cbuf_putch() in my UART interrupt to buffer incoming serial data, do I need to block the interrupt while using other cbuf functions in the main flow? Thanks.