Summary
In this chapter, we covered several techniques for using C libraries in C++ projects. By wrapping C code in C++ classes, we can organize our code better in loosely coupled software modules. C++ increases type safety and compile-time features allow us to easily organize C wrappers in static
classes.
Applying RAII is simple and provides us with a powerful mechanism that takes care of resource management, as we saw in the example of the littlefs
filesystem.
In the next chapter, we will go over super-loop in bare metal firmware and see how we can enhance it with mechanisms such as sequencer in C++.
Join our community on Discord
Join our community’s Discord space for discussions with the author and other readers:
https://packt.link/embeddedsystems