mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
Merge branch 'bunnie-dev' into main
This commit is contained in:
commit
a85d9ad18b
3 changed files with 9 additions and 3 deletions
3
API.md
3
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
|
## Xous Messaging API In Practice
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 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.
|
- 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.
|
- 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
|
## Roadmap to 1.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#![cfg_attr(target_os = "none", no_std)]
|
#![cfg_attr(target_os = "none", no_std)]
|
||||||
|
|
||||||
pub mod api;
|
pub mod api;
|
||||||
|
pub use api::*;
|
||||||
use xous::{CID, send_message};
|
use xous::{CID, send_message};
|
||||||
use num_traits::ToPrimitive;
|
use num_traits::ToPrimitive;
|
||||||
|
|
||||||
|
|
@ -8,12 +9,13 @@ pub struct Codec {
|
||||||
conn: CID,
|
conn: CID,
|
||||||
}
|
}
|
||||||
impl Codec {
|
impl Codec {
|
||||||
pub fn new(xns: &xous_names::XousNames) -> Result<Self, xous::Error> {
|
pub fn new() -> Self {
|
||||||
|
let xns = xous_names::XousNames::new().expect("couldn't connect to XousNames");
|
||||||
REFCOUNT.fetch_add(1, Ordering::Relaxed);
|
REFCOUNT.fetch_add(1, Ordering::Relaxed);
|
||||||
let conn = xns.request_connection_blocking(api::SERVER_NAME_CODEC).expect("Can't connect to Codec server");
|
let conn = xns.request_connection_blocking(api::SERVER_NAME_CODEC).expect("Can't connect to Codec server");
|
||||||
Ok(Codec {
|
Codec {
|
||||||
conn
|
conn
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue