Skip to content
Snippets Groups Projects
Commit 327245ce authored by Samuel Tardieu's avatar Samuel Tardieu
Browse files

Add documentation

parent 3a66b111
No related branches found
No related tags found
No related merge requests found
......@@ -150,6 +150,10 @@ impl I2C2 {
}
}
/// Install a callback which will be called whenever an I²C
/// request arrives. This callback will decide which bytes are
/// sent back if a read request follows. The read operation will
/// be completed by zeroes as needed.
pub fn set_callback(callback: Callback) {
unsafe { STATE.callback = Some(callback) };
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment