Skip to Content
Hands-On RTOS with Microcontrollers
book

Hands-On RTOS with Microcontrollers

by Brian Amos
May 2020
Intermediate to advanced
496 pages
13h 54m
English
Packt Publishing
Content preview from Hands-On RTOS with Microcontrollers

Testing flexible code

Since the iLed interface isn't directly reliant on any hardware, it is extremely easy to push alternative implementations to ledTask. Rather than passing in one of the actual hardware implementations for iLed, we could pass in anything we like to either LedTaskInit (for integration-level tests) or ledTask (for unit tests). The implementations, in these cases, would likely set variables in the testing environment when called. For example, On could set a Boolean to TRUE when called and Off could set the same Boolean to FALSE. These types of tests can be used to verify the logic of the task, without requiring any hardware at all, provided a compiler and an alternative environment is set up on the development machine. FreeRTOS ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RTOS with Microcontrollers - Second Edition

Hands-On RTOS with Microcontrollers - Second Edition

Jim Yuill, Penn Linder

Publisher Resources

ISBN: 9781838826734Supplemental Content