mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
Shrink endpoint runtime footprint
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
[package]
|
||||
name = "endpoint_test"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
authors.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
include.workspace = true
|
||||
|
||||
[dependencies]
|
||||
unshell = { workspace = true }
|
||||
leaf-shell = { path = "../../unshell-leaves/leaf-shell" }
|
||||
|
||||
[[bin]]
|
||||
name = "endpoint_test"
|
||||
path = "src/main.rs"
|
||||
test = false
|
||||
@@ -0,0 +1,19 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use leaf_shell::{ShellLeaf, ShellState};
|
||||
use unshell::protocol::{Endpoint, Leaf};
|
||||
|
||||
const ID: u32 = 0x12345678;
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub fn main(_argc: i32, _argv: *const *const u8) {
|
||||
let mut endpoint = Endpoint::new(ID);
|
||||
let mut shell = ShellLeaf::new(ShellState::new());
|
||||
|
||||
loop {
|
||||
shell.update(&mut endpoint);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user