From 9b07156b1348e38535a74a8dec2c92726094c4b3 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 19 Feb 2022 01:41:27 +0800 Subject: [PATCH] add deprecation notice to docs & reference to rtc lib for example --- API.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index f76f28295..d6e6c9d9f 100644 --- a/API.md +++ b/API.md @@ -150,9 +150,11 @@ impl MyServer { } /// an example of registering for a callback - /// Note: since Xous 0.9 we support `std` threads and closures. See the Net crate + /// Note: since Xous 0.9 we support `std` threads and closures. See the Net crate or + /// Rtc lib implementation (llio/src/rtc_lib.rs) /// for an example of how to implement callbacks using `std` primitives. - /// The below implementation is how closures are done in a `no-std` fashion. + /// The below implementation is how closures are done in a `no-std` fashion. This is + /// considered deprecated. static mut MYSERVER_CB: Option = None; // this actually goes outside the object decl pub fn hook_callback(&mut self, cb: fn(u32)) -> Result<(), xous::Error> { if unsafe{MYSERVER_CB}.is_some() {