f17ebd17e5a4d705db436b7277aa18c87a9a37d4
The thermistor Beta curve and the fan cubic move onto avr::flash_table instead of hand-rolled [[gnu::progmem]] arrays with raw pgm_read, and the compile-time logarithm uses __builtin_log (which constant-folds on the AVR backend) instead of a hand-rolled series. Same 11284 B, still byte-identical across libavr modes. Co-Authored-By: Claude <noreply@anthropic.com>
fantemp
Temperature-controlled fan firmware (ATmega328P, 16 MHz), rewritten on
libavr: thermistor on ADC0 sampled
free-running and averaged over 1000 conversions, fan on OC0B at 50 kHz,
115200 Bd serial console (help lists the commands), temperature
histogram persisted to EEPROM, watchdog-reset path into a boot-section
bootloader.
The Steinhart–Hart math of the legacy firmware (runtime doubles + libm log) is gone: the Beta equation and the cubic fan curve are evaluated consteval into flash tables — the firmware itself never touches floating point.
Build against a libavr checkout:
LIBAVR_ROOT=/path/to/libavr cmake --preset atmega328p-generated
cmake --build --preset atmega328p-generated
Legacy (yazoalfa submodules) stays on master.
Description
Languages
C++
100%