|
Digital Input/Output Reusable Driver v1.1
This project implements a GPIO reusable driver that can be adapted to various microcontrollers.
|
This project is a personal initiative aimed at developing reusable firmware components for microcontroller platforms. It focuses on a modular and efficient General-Purpose Input/Output (GPIO) driver referred as the Digital Input/Output (DIO) driver on the documentation that can be easily adapted across various microcontroller families.
The software architecture follows a layered approach. This design pattern separates low-level code (drivers or HALs), and application-specific code. A layered architecture promotes reusability and simplifies the portability between different applications or microcontrollers. The layered architecture can be seen in figure 1 and contains a driver and application layer operating on the hardware.
| Application Layer |
| Driver Layer |
| Hardware |
The Driver Layer provides all necessary low-level code to initialize and control hardware peripherals (e.g., GPIO pins, sensors, buttons).
The Application Layer contains no direct hardware manipulation but instead interacts with hardware through the exposed driver interfaces. This abstraction improves maintainability and facilitates hardware migration.
The code is developed using a bare-metal approach and complies with industry-standard guidelines, particularly MISRA-C. Best practices in naming, formatting, documentation, and modular design are followed to ensure reliability and maintainability.
This demonstration configures the user button (PC13) as an input. When pressed:
When released:
Additionally:
The project is fully documented using Doxygen. Inline comments offer detailed insights into function behavior and usage. The generated Doxygen documentation provides a structured and navigable reference for all code modules and components.