#[non_exhaustive]pub struct VBlank { /* private fields */ }Expand description
A light weight VBlank handle.
Will set up the VBlank interrupt handler such that the VBlank interrupt can be waited for. Has internal logic to make missing the VBlank less of an issue by keeping track of the number of VBlanks that has occurred.
use agb::interrupt::VBlank;
let vblank = VBlank::get();
vblank.wait_for_vblank();Implementations§
Source§impl VBlank
impl VBlank
Sourcepub fn get() -> Self
pub fn get() -> Self
Handles setting up everything required to be able to use the wait for interrupt syscall.
Sourcepub fn wait_for_vblank(&self)
pub fn wait_for_vblank(&self)
Pauses CPU until vblank interrupt is triggered where code execution is resumed.
Not available in embassy mode - use embassy-agb’s async wait_for_vblank instead.
Auto Trait Implementations§
impl !Freeze for VBlank
impl !RefUnwindSafe for VBlank
impl Send for VBlank
impl !Sync for VBlank
impl Unpin for VBlank
impl UnwindSafe for VBlank
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more