|
ATmega328p
Hardware definitions
|
This repository describes the ATmega328P. It does not implement peripheral behavior.
The public C++ interface uses:
The consuming project creates a common alias:
Shared peripheral libraries use mcu::gpio, mcu::timer, and other common namespaces. Another MCU repository should expose the same module names and common member names where the hardware supports them.
Macros are reserved for package/grade selection, feature detection, and preprocessor checks. Ordinary C++ code should use namespace constants.
A logical pin such as PB5 identifies the silicon signal. Its terminal number depends on the physical package. Select the package in MCUConfig.h and use mcu::package::selected::PB5 for the terminal number.
The same approach is used for operating grades: mcu::electrical::selected refers to the selected grade profile.
Headers contain compile-time values and enums. They do not access hardware registers, initialize peripherals, declare interrupt handlers, or allocate runtime tables.