tsb: use the named register surface

Direct register access now reads through the named surface
(hw::mcusr::wdrf.test(), hw::ucsr0b::write(...)) instead of the string form,
matching how libavr itself is written. Zero-overhead: pure 740 B, tricks 658 B,
asm 508 B unchanged, all byte-identical across modes, protocol green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 14:55:01 +02:00
parent 57d94cf631
commit f32a27ff15
3 changed files with 7 additions and 8 deletions

View File

@@ -185,7 +185,7 @@ void write_config()
[[noreturn]] void run()
{
if (avr::hw::reg<"MCUSR">::read() & avr::hw::field<"MCUSR", "WDRF">{}(1).value)
if (avr::hw::mcusr::read() & avr::hw::mcusr::wdrf(1).value)
appjump();
avr::init<serial_t>();