mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
should be borrowing the name server object to make connections
This commit is contained in:
parent
bd54b48f8f
commit
8786b6db7b
4 changed files with 4 additions and 4 deletions
|
|
@ -138,7 +138,7 @@ pub struct MyServer {
|
|||
callback_sid: Option<xous::SID>, // this is only necessary if you have callbacks
|
||||
}
|
||||
impl MyServer {
|
||||
pub fn new(xns: xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
pub fn new(xns: &xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
let conn = xns.request_connection_blocking(api::MY_SERVER_NAME).expect("Can't connect to MyServer");
|
||||
Ok(MyServer {
|
||||
conn,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ pub struct Com {
|
|||
battstats_sid: Option<xous::SID>,
|
||||
}
|
||||
impl Com {
|
||||
pub fn new(xns: xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
pub fn new(xns: &xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
let conn = xns.request_connection_blocking(api::SERVER_NAME_COM).expect("Can't connect to COM server");
|
||||
Ok(Com {
|
||||
conn,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ pub struct Gfx {
|
|||
conn: xous::CID,
|
||||
}
|
||||
impl Gfx {
|
||||
pub fn new(xns: xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
pub fn new(&xns: xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
let conn = xns.request_connection_blocking(api::SERVER_NAME_GFX).expect("Can't connect to GFX");
|
||||
Ok(Gfx {
|
||||
conn,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ pub struct Trng {
|
|||
conn: CID,
|
||||
}
|
||||
impl Trng {
|
||||
pub fn new(xns: xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
pub fn new(&xns: xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
let conn = xns.request_connection_blocking(api::SERVER_NAME_TRNG).expect("Can't connect to TRNG server");
|
||||
Ok(Trng {
|
||||
conn
|
||||
|
|
|
|||
Loading…
Reference in a new issue