Put the Knowledge to Work

  1. Look at the application of OCP and LSP in MyOS in Appendix 5, Example OS Isolation Layer. Evolve MyOS to support Mutex and Event. A Mutex can be acquired and released. One thread can wait for a signal from another thread.

  2. Add an accessor function to get the return result from a joined thread by calling Thread_Result. (You can find my work on that in t1/tests/MyOS, t1/include/MyOS, and t1/src/MyOS.)

  3. Make a list of all the changes needed to add LightDriver functions for brighten, dim, and strobe to the LightDriver in the code/t1 code base.

  4. Add LightDriver functions for brighten, dim, and strobe to the LightDriver and LightDriverSpy in the code/t3 code base. Test-drive this, of course. Compare the work needed ...

Get Test Driven Development for Embedded C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.