Question.3
A developer uses type aliases for hardware abstraction:
#ifdef STM32 using RegType = uint32_t; #else using RegType = uint16_t; #endif void write_register(RegType value);
What firmware technique does this demonstrate?
Select Answer
Runtime polymorphism -- the type is selected at runtime
Compile-time platform abstraction -- the register width adapts to the target MCU without changing driver code
Dynamic typing -- RegType can hold any size
RegType
Template specialization