Hardware abstraction layers (HALs) are an important layer to every embedded software application. A HAL allows a developer to abstract or decouple the hardware details from the application code.
Ask most embedded developers why they're still writing firmware in C, and you'll hear the same answer: "C++ is too heavy for embedded." That concern has merit. It's also more than 20 years out of date ...