mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-08 02:57:16 +08:00
The hardware can read and write address zero just fine, but doing it through a C null pointer will invoke undefined behavior and may cause the compiler to emit faulting instructions. Switch to using an assembly instruction to do the actual access, thereby avoiding UB by not having an actual null pointer anywhere. Simplifies the code and reduces flash usage while improving safety 0.1%!