2 ms·
Oh yes, a good example is setting a magic value to a registry [1] to make sure your microcontroller (in my case, an ESP32-S3) wouldn't reboot because of the wat
by denysvitali 2y ago
Oh yes, a good example is setting a magic value to a registry [1] to make sure your microcontroller (in my case, an ESP32-S3) wouldn't reboot because of the watchdog.
At first, I was confused on the behavior - after reading the datasheet and setting the magic value, it all made sense. I'm pretty sure it will look like wizardry to the next person looking at the magic value alone.
Thankfully code comments are a thing, but magic values are still magic values.
[1]: https://github.com/tinygo-org/tinygo/pull/3937/files#diff-8f484e3d04c062bab1a6569baf9d302ec506c49b9ae9b30f98b53254bac13d97R41 https://github.com/tinygo-org/tinygo/pull/3937/files#diff-8f...