Writing reusable drivers 

There are a few different levels of drivers that are fairly common in embedded development. MCU peripheral drivers are the drivers used to provide a convenient API to hardware included on the MCU. These types of drivers were developed in Chapter 10, Drivers and ISRs. Another commonly used driver is a driver for a specific IC, which is what was alluded to in the preceding ADC example:

Peripheral drivers sit immediately above the hardware. IC drivers sit above (and often use) peripheral drivers in the stack. If an IC driver is meant to work across multiple MCUs, it must use interfaces that are completely agnostic to ...

Get Hands-On RTOS with Microcontrollers 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.