From c6871d58b135f294f1003bee867fe30540114cd5 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 7 Nov 2024 16:17:08 +0800 Subject: [PATCH] placeholder stub for the future USB stack on cramium targets The USB hardware stack is different enough that I think it doesn't make sense to wedge it into the existing USB driver. Instead it will be a separate driver that has the same `lib` level API calls, but a totally different implementation underneath. This allows us to make better architectural decisions that will make the USB stack more reliable because the hardware has some pretty strict latency requirements on responding to packets that can't be met with the previous abstraction. --- services/usb-cramium/Cargo.toml | 24 ++++++++++++++++++++++++ services/usb-cramium/src/main.rs | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 services/usb-cramium/Cargo.toml create mode 100644 services/usb-cramium/src/main.rs diff --git a/services/usb-cramium/Cargo.toml b/services/usb-cramium/Cargo.toml new file mode 100644 index 000000000..ccbec2334 --- /dev/null +++ b/services/usb-cramium/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "usb-cramium" +version = "0.1.0" +edition = "2021" + +[dependencies] +utralib = { version = "0.1.25", optional = true, default-features = false } +xous-names = { package = "xous-api-names", version = "0.9.63" } +ticktimer = { package = "xous-api-ticktimer", version = "0.9.61" } +xous = "0.9.64" +log-server = { package = "xous-api-log", version = "0.1.61" } +log = "0.4.14" +num-derive = { version = "0.3.3", default-features = false } +num-traits = { version = "0.2.14", default-features = false } +cramium-hal = { path = "../../libs/cramium-hal", features = ["std"] } +cram-hal-service = { path = "../cram-hal-service" } +xous-usb-hid = { git = "https://github.com/betrusted-io/xous-usb-hid.git", branch = "main" } +ghostfat = "0.5.0" + +locales = { path = "../../locales" } + +[features] +cramium-soc = ["utralib/cramium-soc"] +default = [] diff --git a/services/usb-cramium/src/main.rs b/services/usb-cramium/src/main.rs new file mode 100644 index 000000000..e7a11a969 --- /dev/null +++ b/services/usb-cramium/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}