I have some questions about modular embedded systems codes and its usage. I am building an IoT Systems with esp32 now. To learn professional approaches for embedded systems, I have split codes to libraries. My aim at this architecture, create generic libraries for my colleagues and learn something about modular embedded systems programming.
I created .cpp files and .h files for Communication layers, sensor measurement layers, connections and database(EEPROM) layers etc.
I have some high level programming lang. experiences(C#,Python) so I want use OOP on my codes. So I created cpp classes on my codes. In C, I wrote .c and .h files too.
My approach may be wrong for this situation. I have no professional embedded systems experiences . My main field is Automation Systems. I tried implement this kind of High level approaches on PLC's too.
In this situation what are differences betweeb cpp classes and .c sources? What are pros and cons? If you have suggestions and documents-tutorials, can you share?