pub fn set_error_hook(hook: Option<fn()>)Expand description
Install a handler for the GPU2D error interrupt.
The GPU2D raises its error interrupt for two unrelated things: a genuine
peripheral error, and the cache-hold handshake that NemaGFX’s vector
rendering path uses (nema_ext_hold_assert()), where the command-list
processor halts until the CPU performs cache maintenance and deasserts the
hold. Servicing the latter needs the NemaGFX library, which this crate must
not depend on, so platforms that need it install a handler here.
When a hook is installed it takes over the interrupt entirely: this driver
neither masks the interrupt nor wakes Gpu2d::wait_command_list_complete
from it, since the hardware event is edge-triggered and has to stay
unmasked. See set_error_hook(None) to restore the
default behaviour.