I am writing a C code for an AVR chip. This code is heavy for interrupt routines that wait for serial ports, ADCs, and timers. ISRs are written to buffers that the main loop analyzes when they get to them.
I create buffers so that ISRs can update them while the main loop reads them. I want to check that this works. I have unit tests for checking the basic operation, but I don’t know how to check what happens if the interrupt is triggered when the main loop is read in the buffer.
My unit test is really basic - some code in main()finction. I run tests in my Linux box.
source
share