From b76f02bb11d563344eb6ce05a6815b6dea4eb1d0 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 13 Feb 2025 17:38:14 +0800 Subject: [PATCH] get past some configuration issues --- services/bao-video/Cargo.toml | 4 +++- services/bao-video/src/main.rs | 34 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/services/bao-video/Cargo.toml b/services/bao-video/Cargo.toml index f99e3fb64..019f252fc 100644 --- a/services/bao-video/Cargo.toml +++ b/services/bao-video/Cargo.toml @@ -12,7 +12,9 @@ log-server = { package = "xous-api-log", version = "0.1.63" } log = "0.4.14" num-derive = { version = "0.4.2", default-features = false } num-traits = { version = "0.2.14", default-features = false } -cramium-hal = { path = "../../libs/cramium-hal", features = ["std"] } +cramium-hal = { path = "../../libs/cramium-hal", features = [ + "std", +], optional = true } cram-hal-service = { path = "../cram-hal-service", optional = true } ux-api = { path = "../../libs/ux-api" } diff --git a/services/bao-video/src/main.rs b/services/bao-video/src/main.rs index 2ac4263be..a112b85a9 100644 --- a/services/bao-video/src/main.rs +++ b/services/bao-video/src/main.rs @@ -5,11 +5,11 @@ use num_traits::ToPrimitive; use utralib::utra; use ux_api::minigfx::*; +mod api; mod gfx; mod homography; mod modules; mod qr; -mod api; use api::*; #[cfg(feature = "board-baosec")] mod hw; @@ -21,22 +21,22 @@ mod hosted; #[cfg(feature = "hosted-baosec")] use hosted::wrapped_main; -//! Scope of this crate: -//! -//! bao-video contains the platform-specific drivers for the baosec platform that pertain -//! to video: both the capture of video, as well as any operations involving drawing to -//! the display (rendering graphics primitives, etc). -//! -//! Note that explicitly out of scope are the higher-level API calls for UI management, e.g. -//! creation of modals and managing draw lists. Only the hardware renderers should be implemented -//! in this crate. Think of it like a kernel module that handles a video subsystem, where both -//! camera and display are co-located in the same module for fast data sharing (keep in mind -//! this is a microkernel, so we don't have a monolith data space like Linux: all drivers are -//! in their own process space unless explicitly co-located). -//! -//! It also pulls in QR code processing for performance reasons - by keeping the QR code -//! processing in the process space of the camera, we can avoid an expensive memcopy between -//! process spaces and improve the responsiveness of the feedback loop while QR searching happens. +// Scope of this crate: +// +// bao-video contains the platform-specific drivers for the baosec platform that pertain +// to video: both the capture of video, as well as any operations involving drawing to +// the display (rendering graphics primitives, etc). +// +// Note that explicitly out of scope are the higher-level API calls for UI management, e.g. +// creation of modals and managing draw lists. Only the hardware renderers should be implemented +// in this crate. Think of it like a kernel module that handles a video subsystem, where both +// camera and display are co-located in the same module for fast data sharing (keep in mind +// this is a microkernel, so we don't have a monolith data space like Linux: all drivers are +// in their own process space unless explicitly co-located). +// +// It also pulls in QR code processing for performance reasons - by keeping the QR code +// processing in the process space of the camera, we can avoid an expensive memcopy between +// process spaces and improve the responsiveness of the feedback loop while QR searching happens. pub const IMAGE_WIDTH: usize = 256; pub const IMAGE_HEIGHT: usize = 240;