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

Recognizing opportunities to reuse code

There is no absolute rule to follow when determining whether formalized abstractions should be used (if abstractions are not already present). However, there are some hints, which are as follows:

  • If you're writing code that can be used by more than one project: Interfacing with the underlying hardware should be done through an abstraction (the ADC driver and algorithm in the preceding section are examples of this).  Otherwise, the code will be tied to the specific piece of hardware it was written for.
  • If your code interacts with a vendor-specific API: Creating a light abstraction layer above it will reduce vendor lock-in. After interfaces are commonly used and set up, you'll start to gravitate toward ...
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