diff --git a/API.md b/API.md index 867ce5cac..4861d236a 100644 --- a/API.md +++ b/API.md @@ -1,3 +1,6 @@ +The [Xous Book](https://betrusted.io/xous-book/ch07-02-caller-idioms.html) reviews the system architecture and breaks down the various API idioms chapter-by-chapter. + +This document conveys much of the similar information, but in a more monolithic form. This document also does not cover [deferred response](https://betrusted.io/xous-book/ch07-06-deferred.html) idioms. ## Xous Messaging API In Practice diff --git a/RELEASE-v0.9.md b/RELEASE-v0.9.md index 60c87e97e..d2496e6fe 100644 --- a/RELEASE-v0.9.md +++ b/RELEASE-v0.9.md @@ -127,6 +127,7 @@ for examples of idiomatic ways to write code for Xous. - Sleep screen is now blanked of all prior content and just the sentinel message is held - Sleep/suspend lightly refactored to fix some bugs. Ticktimer is now the sole `Last` event. - Preliminary text to speech (TTS) support added; compile with `cargo xtask tts` or set the LOCALE to `en-tts` to try it out. +- Introduce deferred-response pattern into modals, pddb, and susres. ## Roadmap to 1.0 diff --git a/services/skeleton/src/lib.rs b/services/skeleton/src/lib.rs index 49f1532ce..ca6fb94e2 100644 --- a/services/skeleton/src/lib.rs +++ b/services/skeleton/src/lib.rs @@ -1,6 +1,7 @@ #![cfg_attr(target_os = "none", no_std)] pub mod api; +pub use api::*; use xous::{CID, send_message}; use num_traits::ToPrimitive; @@ -8,12 +9,13 @@ pub struct Codec { conn: CID, } impl Codec { - pub fn new(xns: &xous_names::XousNames) -> Result { + pub fn new() -> Self { + let xns = xous_names::XousNames::new().expect("couldn't connect to XousNames"); REFCOUNT.fetch_add(1, Ordering::Relaxed); let conn = xns.request_connection_blocking(api::SERVER_NAME_CODEC).expect("Can't connect to Codec server"); - Ok(Codec { + Codec { conn - }) + } } }