title: Embedded software test, how to test bit state and time spent in that state?
body: <p>I wrote a function that sends morse code by manipulating a GPIO pin. The pin is set high for a certain amount of time to signal DOT. Then set low for certain time to signal DOT-DASH space etc.</p>
  
  <p>So the problem is that I send a sequence for example "CBA" and then the program does it and from the cpputest code I can only test the final state of the pins. I would like to write a test to check the time spent in each state and the state of the bit. How is that possible?</p>