@@ -2,7 +2,6 @@ include!(concat!(env!("OUT_DIR"), "/build_constants.rs"));
2
2
3
3
use crate :: hal;
4
4
use hal:: drivers:: timer;
5
- use interchange:: Interchange ;
6
5
use littlefs2:: { const_ram_storage, consts} ;
7
6
use trussed:: types:: { LfsResult , LfsStorage } ;
8
7
use trussed:: { platform, store} ;
@@ -117,21 +116,9 @@ pub trait TrussedApp: Sized {
117
116
fn with_client ( trussed : TrussedClient , non_portable : Self :: NonPortable ) -> Self ;
118
117
119
118
fn with ( trussed : & mut trussed:: Service < crate :: Board > , non_portable : Self :: NonPortable ) -> Self {
120
- let ( trussed_requester, trussed_responder) = trussed:: pipe:: TrussedInterchange :: claim ( )
121
- . expect ( "could not setup TrussedInterchange" ) ;
122
-
123
- let mut client_id = littlefs2:: path:: PathBuf :: new ( ) ;
124
- client_id. push ( Self :: CLIENT_ID . try_into ( ) . unwrap ( ) ) ;
125
- assert ! ( trussed. add_endpoint( trussed_responder, client_id) . is_ok( ) ) ;
126
-
127
- let syscaller = Syscall :: default ( ) ;
128
- let trussed_client = TrussedClient :: new (
129
- trussed_requester,
130
- syscaller,
131
- ) ;
132
-
133
- let app = Self :: with_client ( trussed_client, non_portable) ;
134
- app
119
+ let client_id = core:: str:: from_utf8 ( Self :: CLIENT_ID ) . unwrap ( ) ;
120
+ let client = trussed. try_new_client ( client_id, Syscall :: default ( ) ) . unwrap ( ) ;
121
+ Self :: with_client ( client, non_portable)
135
122
}
136
123
}
137
124
0 commit comments