mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01:34 +11:00
add some docs
This commit is contained in:
parent
c60eaaaff0
commit
b559b0eb54
|
@ -215,6 +215,8 @@ fn get_interrupt_handle_root<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The [add_interrupt_handler!] macro should be used instead of this function.
|
||||||
|
/// Creates an interrupt handler from a closure.
|
||||||
pub fn get_interrupt_handle(
|
pub fn get_interrupt_handle(
|
||||||
f: &(dyn Fn(Key) + Send + Sync),
|
f: &(dyn Fn(Key) + Send + Sync),
|
||||||
interrupt: Interrupt,
|
interrupt: Interrupt,
|
||||||
|
@ -224,6 +226,9 @@ pub fn get_interrupt_handle(
|
||||||
get_interrupt_handle_root(f, root)
|
get_interrupt_handle_root(f, root)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The [add_interrupt_handler!] macro should be used instead of this.
|
||||||
|
/// Adds an interrupt handler to the interrupt table such that when that
|
||||||
|
/// interrupt is triggered the closure is called.
|
||||||
pub fn add_interrupt<'a>(interrupt: Pin<&'a InterruptClosureBounded<'a>>) {
|
pub fn add_interrupt<'a>(interrupt: Pin<&'a InterruptClosureBounded<'a>>) {
|
||||||
let root = unsafe { &*interrupt.c.root };
|
let root = unsafe { &*interrupt.c.root };
|
||||||
root.add();
|
root.add();
|
||||||
|
|
Loading…
Reference in a new issue