|
ATmega328p
Hardware definitions
|
Add the repository's include directory to the compiler include path, then include the aggregate header:
For a smaller dependency, include only the required module header.
Keep the selected MCU and board-specific values in one configuration header owned by the consuming firmware:
This is an example configuration. Confirm the package, ordering grade, oscillator, clock frequency, and fuse bytes for the actual board.
The mcu alias gives peripheral libraries a consistent way to access the selected device:
For another device, the configuration header includes that device's definitions and changes the alias:
A common peripheral library can keep using mcu::gpio, mcu::timer, mcu::pwm, and the other agreed namespaces.
The tests directory contains compile-only tests for the public headers, package selections, grade selections, and invalid configurations. Run tests/run_tests.sh with a C++11 compiler on Linux or macOS, or tests/run_tests.bat on Windows with g++ in PATH.
This repository does not configure the build system, program fuses, or upload firmware.