portable device access api based on unix file descriptors

This commit is contained in:
2024-07-20 00:27:24 +02:00
parent 49c19ba675
commit cbe8184fab
23 changed files with 241 additions and 133 deletions

View File

@ -11,14 +11,6 @@ use core::panic::PanicInfo;
use fsrc::objectmanager::SystemObjectIF;
use fsrc::*;
use descriptor_procmac::Device_Descriptor;
trait Hardware_Write {
fn write(&mut self, buf: &[u8]) -> Result<core::ffi::c_int,()>;
}
Device_Descriptor!("rw");
extern "C" {
fn done();
}
@ -78,9 +70,6 @@ extern "C" fn rust_alloc_failed(){
#[no_mangle]
extern "C" fn rust_main() {
sifln!("Rust startup 🚀");
let mut rw = Descriptor_rw{};
let data: &[u8] = &[0x30,0x31,10];
_ = rw.write(data);
mission();
sifln!("Mission done");
}