Tag Archives: templates

Compile-Time Polymorphism

Let’s say we have a peripheral, like an accelerometer, connected via an SPI bus. Then let’s say we have to different embedded projects that make use of this same chip, implemented on two different microcontrollers. Wouldn’t it be nice to be able to write the accelerometer communication code once, keep a low runtime overhead that… Read More »