mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
graphics-server: use String for String opcode
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
f149c086ef
commit
9192775e5e
1 changed files with 3 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
pub mod api;
|
||||
pub use api::{Point, Color, Rect};
|
||||
use xous::String;
|
||||
|
||||
use xous::{send_message, CID};
|
||||
|
||||
|
|
@ -29,6 +30,6 @@ pub fn clear_region(cid: CID, x0: usize, y0: usize, x1: usize, y1: usize) -> Res
|
|||
send_message(cid, api::Opcode::ClearRegion(Rect::new(x0 as _, y0 as _, x1 as _, y1 as _)).into()).map(|_| ())
|
||||
}
|
||||
|
||||
pub fn draw_string(cid: CID, s: &str) -> Result<(), xous::Error> {
|
||||
send_message(cid, api::Opcode::String(s).into()).map(|_| ())
|
||||
pub fn draw_string(cid: CID, s: &String) -> Result<(), xous::Error> {
|
||||
s.lend(cid, 1).map(|_| ())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue