update deps
This commit is contained in:
136
Cargo.lock
generated
136
Cargo.lock
generated
@@ -77,6 +77,12 @@ dependencies = [
|
||||
"term 1.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "assign-resources"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "840ad5d907de7448d88a3f22b4a7b5d326c6eb3deeb9f94cfaaec7354a80b305"
|
||||
|
||||
[[package]]
|
||||
name = "atomic-polyfill"
|
||||
version = "1.0.3"
|
||||
@@ -496,7 +502,7 @@ checksum = "8578db196d74db92efdd5ebc546736dac1685499ee245b22eff92fa5e4b57945"
|
||||
dependencies = [
|
||||
"embassy-futures",
|
||||
"embassy-hal-internal 0.3.0",
|
||||
"embassy-sync 0.7.0",
|
||||
"embassy-sync 0.7.2",
|
||||
"embassy-time 0.4.0",
|
||||
"embedded-hal 0.2.7",
|
||||
"embedded-hal 1.0.0",
|
||||
@@ -507,23 +513,41 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-executor"
|
||||
version = "0.7.0"
|
||||
name = "embassy-embedded-hal"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90327bcc66333a507f89ecc4e2d911b265c45f5c9bc241f98eee076752d35ac6"
|
||||
checksum = "554e3e840696f54b4c9afcf28a0f24da431c927f4151040020416e7393d6d0d8"
|
||||
dependencies = [
|
||||
"embassy-futures",
|
||||
"embassy-hal-internal 0.3.0",
|
||||
"embassy-sync 0.7.2",
|
||||
"embedded-hal 0.2.7",
|
||||
"embedded-hal 1.0.0",
|
||||
"embedded-hal-async",
|
||||
"embedded-storage",
|
||||
"embedded-storage-async",
|
||||
"nb 1.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-executor"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06070468370195e0e86f241c8e5004356d696590a678d47d6676795b2e439c6b"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"critical-section",
|
||||
"defmt 0.3.100",
|
||||
"defmt 1.0.1",
|
||||
"document-features",
|
||||
"embassy-executor-macros",
|
||||
"embassy-executor-timer-queue",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-executor-macros"
|
||||
version = "0.6.2"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3577b1e9446f61381179a330fc5324b01d511624c55f25e3c66c9e3c626dbecf"
|
||||
checksum = "dfdddc3a04226828316bf31393b6903ee162238576b1584ee2669af215d55472"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
@@ -532,10 +556,16 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-futures"
|
||||
version = "0.1.1"
|
||||
name = "embassy-executor-timer-queue"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f878075b9794c1e4ac788c95b728f26aa6366d32eeb10c7051389f898f7d067"
|
||||
checksum = "2fc328bf943af66b80b98755db9106bf7e7471b0cf47dc8559cd9a6be504cc9c"
|
||||
|
||||
[[package]]
|
||||
name = "embassy-futures"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc2d050bdc5c21e0862a89256ed8029ae6c290a93aecefc73084b3002cdebb01"
|
||||
|
||||
[[package]]
|
||||
name = "embassy-hal-internal"
|
||||
@@ -545,7 +575,6 @@ checksum = "0ef3bac31ec146321248a169e9c7b5799f1e0b3829c7a9b324cb4600a7438f59"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"critical-section",
|
||||
"defmt 0.3.100",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
@@ -555,6 +584,9 @@ version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95285007a91b619dc9f26ea8f55452aa6c60f7115a4edc05085cd2bd3127cd7a"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
@@ -566,13 +598,13 @@ checksum = "524eb3c489760508f71360112bca70f6e53173e6fe48fc5f0efd0f5ab217751d"
|
||||
|
||||
[[package]]
|
||||
name = "embassy-net-driver-channel"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25a567ab50319d866ad5e6c583ed665ba9b07865389644d3d82e45bf1497c934"
|
||||
checksum = "b7b2739fbcf6cd206ae08779c7d709087b16577d255f2ea4a45bc4bbbf305b3f"
|
||||
dependencies = [
|
||||
"embassy-futures",
|
||||
"embassy-net-driver",
|
||||
"embassy-sync 0.7.0",
|
||||
"embassy-sync 0.7.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -587,12 +619,12 @@ dependencies = [
|
||||
"cortex-m-rt",
|
||||
"critical-section",
|
||||
"document-features",
|
||||
"embassy-embedded-hal",
|
||||
"embassy-embedded-hal 0.3.1",
|
||||
"embassy-futures",
|
||||
"embassy-hal-internal 0.2.0",
|
||||
"embassy-sync 0.6.2",
|
||||
"embassy-time 0.4.0",
|
||||
"embassy-usb-driver",
|
||||
"embassy-usb-driver 0.1.1",
|
||||
"embedded-hal 0.2.7",
|
||||
"embedded-hal 1.0.0",
|
||||
"embedded-hal-async",
|
||||
@@ -605,7 +637,7 @@ dependencies = [
|
||||
"nb 1.1.0",
|
||||
"pio 0.2.1",
|
||||
"pio-proc 0.2.2",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"rp-pac",
|
||||
"rp2040-boot2",
|
||||
"sha2-const-stable",
|
||||
@@ -614,25 +646,25 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "embassy-rp"
|
||||
version = "0.4.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1a063d8baccdc5c7752840f4c7931f17bcd7de1ffe1efa2109e68113fe42612"
|
||||
checksum = "1a284935af0a869de3fa14af74b5f932389dd66d7048012f1083b06f38d05399"
|
||||
dependencies = [
|
||||
"atomic-polyfill",
|
||||
"cfg-if",
|
||||
"cortex-m",
|
||||
"cortex-m-rt",
|
||||
"critical-section",
|
||||
"defmt 0.3.100",
|
||||
"defmt 1.0.1",
|
||||
"document-features",
|
||||
"embassy-embedded-hal",
|
||||
"embassy-embedded-hal 0.5.0",
|
||||
"embassy-futures",
|
||||
"embassy-hal-internal 0.2.0",
|
||||
"embassy-sync 0.6.2",
|
||||
"embassy-time 0.4.0",
|
||||
"embassy-hal-internal 0.3.0",
|
||||
"embassy-sync 0.7.2",
|
||||
"embassy-time 0.5.0",
|
||||
"embassy-time-driver",
|
||||
"embassy-time-queue-utils",
|
||||
"embassy-usb-driver",
|
||||
"embassy-usb-driver 0.2.0",
|
||||
"embedded-hal 0.2.7",
|
||||
"embedded-hal 1.0.0",
|
||||
"embedded-hal-async",
|
||||
@@ -644,7 +676,8 @@ dependencies = [
|
||||
"fixed",
|
||||
"nb 1.1.0",
|
||||
"pio 0.3.0",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"rand_core 0.9.3",
|
||||
"rp-pac",
|
||||
"rp2040-boot2",
|
||||
"sha2-const-stable",
|
||||
@@ -667,16 +700,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "embassy-sync"
|
||||
version = "0.7.0"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cef1a8a1ea892f9b656de0295532ac5d8067e9830d49ec75076291fd6066b136"
|
||||
checksum = "73974a3edbd0bd286759b3d483540f0ebef705919a5f56f4fc7709066f71689b"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"embedded-io-async",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"futures-util",
|
||||
"heapless",
|
||||
]
|
||||
|
||||
@@ -688,10 +721,8 @@ checksum = "f820157f198ada183ad62e0a66f554c610cdcd1a9f27d4b316358103ced7a1f8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"critical-section",
|
||||
"defmt 0.3.100",
|
||||
"document-features",
|
||||
"embassy-time-driver",
|
||||
"embassy-time-queue-utils",
|
||||
"embedded-hal 0.2.7",
|
||||
"embedded-hal 1.0.0",
|
||||
"embedded-hal-async",
|
||||
@@ -706,8 +737,10 @@ checksum = "f4fa65b9284d974dad7a23bb72835c4ec85c0b540d86af7fc4098c88cff51d65"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"document-features",
|
||||
"embassy-time-driver",
|
||||
"embassy-time-queue-utils",
|
||||
"embedded-hal 0.2.7",
|
||||
"embedded-hal 1.0.0",
|
||||
"embedded-hal-async",
|
||||
@@ -725,24 +758,25 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "embassy-time-queue-utils"
|
||||
version = "0.1.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc55c748d16908a65b166d09ce976575fb8852cf60ccd06174092b41064d8f83"
|
||||
checksum = "80e2ee86063bd028a420a5fb5898c18c87a8898026da1d4c852af2c443d0a454"
|
||||
dependencies = [
|
||||
"embassy-executor",
|
||||
"embassy-executor-timer-queue",
|
||||
"heapless",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-usb"
|
||||
version = "0.4.0"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e651b9b7b47b514e6e6d1940a6e2e300891a2c33641917130643602a0cb6386"
|
||||
checksum = "dc4462e48b19a4f401a11901bdd981aab80c6a826608016a0bdc73cbbab31954"
|
||||
dependencies = [
|
||||
"embassy-futures",
|
||||
"embassy-net-driver-channel",
|
||||
"embassy-sync 0.6.2",
|
||||
"embassy-usb-driver",
|
||||
"embassy-sync 0.7.2",
|
||||
"embassy-usb-driver 0.2.0",
|
||||
"embedded-io-async",
|
||||
"heapless",
|
||||
"ssmarshal",
|
||||
"usbd-hid",
|
||||
@@ -753,6 +787,15 @@ name = "embassy-usb-driver"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "340c5ce591ef58c6449e43f51d2c53efe1bf0bb6a40cbf80afa0d259c7d52c76"
|
||||
dependencies = [
|
||||
"embedded-io-async",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-usb-driver"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17119855ccc2d1f7470a39756b12068454ae27a3eabb037d940b5c03d9c77b7a"
|
||||
dependencies = [
|
||||
"defmt 1.0.1",
|
||||
"embedded-io-async",
|
||||
@@ -1203,6 +1246,7 @@ name = "kernel"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"abi_sys",
|
||||
"assign-resources",
|
||||
"bitflags 2.9.1",
|
||||
"bt-hci",
|
||||
"cortex-m",
|
||||
@@ -1211,12 +1255,12 @@ dependencies = [
|
||||
"cyw43-pio",
|
||||
"defmt 0.3.100",
|
||||
"defmt-rtt",
|
||||
"embassy-embedded-hal",
|
||||
"embassy-embedded-hal 0.3.1",
|
||||
"embassy-executor",
|
||||
"embassy-futures",
|
||||
"embassy-rp 0.4.0",
|
||||
"embassy-sync 0.7.0",
|
||||
"embassy-time 0.4.0",
|
||||
"embassy-rp 0.8.0",
|
||||
"embassy-sync 0.7.2",
|
||||
"embassy-time 0.5.0",
|
||||
"embassy-usb",
|
||||
"embedded-graphics",
|
||||
"embedded-hal 0.2.7",
|
||||
@@ -1711,6 +1755,12 @@ version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.13"
|
||||
@@ -2112,7 +2162,7 @@ dependencies = [
|
||||
"embedded-io",
|
||||
"futures",
|
||||
"heapless",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"static_cell",
|
||||
"trouble-host-macros",
|
||||
"zerocopy",
|
||||
|
||||
@@ -31,20 +31,20 @@ defmt = [
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.7", features = [
|
||||
embassy-executor = { version = "0.9", features = [
|
||||
"arch-cortex-m",
|
||||
"executor-interrupt",
|
||||
"executor-thread",
|
||||
"nightly",
|
||||
] }
|
||||
embassy-rp = { version = "0.4.0", features = [
|
||||
embassy-rp = { version = "0.8.0", features = [
|
||||
"critical-section-impl",
|
||||
"unstable-pac",
|
||||
"time-driver",
|
||||
] }
|
||||
embassy-usb = "0.4.0"
|
||||
embassy-futures = "0.1.1"
|
||||
embassy-time = { version = "0.4.0", features = ["generic-queue-8"] }
|
||||
embassy-usb = "0.5.1"
|
||||
embassy-futures = "0.1.2"
|
||||
embassy-time = { version = "0.5.0", features = ["generic-queue-8"] }
|
||||
embassy-embedded-hal = "0.3.1"
|
||||
embassy-sync = { version = "0.7" }
|
||||
trouble-host = { version = "0.1", features = [
|
||||
@@ -65,6 +65,7 @@ cortex-m = { version = "0.7.7" }
|
||||
cortex-m-rt = "0.7.5"
|
||||
panic-probe = "0.3"
|
||||
portable-atomic = { version = "1.11", features = ["critical-section"] }
|
||||
assign-resources = "0.5.0"
|
||||
|
||||
defmt = { version = "0.3", optional = true }
|
||||
defmt-rtt = "0.4.2"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use embassy_rp::{
|
||||
Peri,
|
||||
gpio::{Level, Output},
|
||||
peripherals::{PIN_13, PIN_14, PIN_15, SPI1},
|
||||
spi::{Async, Spi},
|
||||
@@ -30,9 +31,9 @@ pub static FRAMEBUFFER: LazyLock<Mutex<CriticalSectionRawMutex, FB>> =
|
||||
|
||||
pub async fn init_display(
|
||||
spi: Spi<'static, SPI1, Async>,
|
||||
cs: PIN_13,
|
||||
data: PIN_14,
|
||||
reset: PIN_15,
|
||||
cs: Peri<'static, PIN_13>,
|
||||
data: Peri<'static, PIN_14>,
|
||||
reset: Peri<'static, PIN_15>,
|
||||
) -> DISPLAY {
|
||||
let spi_device = ExclusiveDevice::new(spi, Output::new(cs, Level::Low), Delay).unwrap();
|
||||
let mut display = ST7365P::new(
|
||||
|
||||
@@ -17,8 +17,6 @@ mod ui;
|
||||
mod usb;
|
||||
mod utils;
|
||||
|
||||
use core::sync::atomic::Ordering;
|
||||
|
||||
use crate::{
|
||||
display::{FRAMEBUFFER, clear_fb, display_handler, init_display},
|
||||
elf::load_binary,
|
||||
@@ -31,14 +29,15 @@ use crate::{
|
||||
usb::usb_handler,
|
||||
};
|
||||
use abi_sys::EntryFn;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
use assign_resources::assign_resources;
|
||||
use defmt::unwrap;
|
||||
use embassy_executor::{Executor, Spawner};
|
||||
use embassy_futures::join::{join, join3, join4, join5};
|
||||
use embassy_rp::{
|
||||
Peri,
|
||||
gpio::{Input, Level, Output, Pull},
|
||||
i2c::{self, I2c},
|
||||
multicore::{Stack, spawn_core1},
|
||||
@@ -157,34 +156,32 @@ async fn userland_task() {
|
||||
}
|
||||
|
||||
struct Display {
|
||||
spi: SPI1,
|
||||
clk: PIN_10,
|
||||
mosi: PIN_11,
|
||||
miso: PIN_12,
|
||||
dma1: DMA_CH0,
|
||||
dma2: DMA_CH1,
|
||||
cs: PIN_13,
|
||||
data: PIN_14,
|
||||
reset: PIN_15,
|
||||
spi: Peri<'static, SPI1>,
|
||||
clk: Peri<'static, PIN_10>,
|
||||
mosi: Peri<'static, PIN_11>,
|
||||
miso: Peri<'static, PIN_12>,
|
||||
dma1: Peri<'static, DMA_CH0>,
|
||||
dma2: Peri<'static, DMA_CH1>,
|
||||
cs: Peri<'static, PIN_13>,
|
||||
data: Peri<'static, PIN_14>,
|
||||
reset: Peri<'static, PIN_15>,
|
||||
}
|
||||
|
||||
struct Sd {
|
||||
spi: SPI0,
|
||||
clk: PIN_18,
|
||||
mosi: PIN_19,
|
||||
miso: PIN_16,
|
||||
cs: PIN_17,
|
||||
det: PIN_22,
|
||||
spi: Peri<'static, SPI0>,
|
||||
clk: Peri<'static, PIN_18>,
|
||||
mosi: Peri<'static, PIN_19>,
|
||||
miso: Peri<'static, PIN_16>,
|
||||
cs: Peri<'static, PIN_17>,
|
||||
det: Peri<'static, PIN_22>,
|
||||
}
|
||||
|
||||
struct Mcu {
|
||||
i2c: I2C1,
|
||||
clk: PIN_7,
|
||||
data: PIN_6,
|
||||
i2c: Peri<'static, I2C1>,
|
||||
clk: Peri<'static, PIN_7>,
|
||||
data: Peri<'static, PIN_6>,
|
||||
}
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn kernel_task(display: Display, sd: Sd, mcu: Mcu, usb: USB) {
|
||||
async fn kernel_task(display: Display, sd: Sd, mcu: Mcu, usb: Peri<'static, USB>) {
|
||||
// MCU i2c bus for peripherals
|
||||
let mut config = i2c::Config::default();
|
||||
config.frequency = 400_000;
|
||||
|
||||
@@ -5,7 +5,9 @@ use embassy_rp::{
|
||||
i2c::{Async, I2c},
|
||||
peripherals::I2C1,
|
||||
};
|
||||
use embassy_sync::{blocking_mutex::raw::NoopRawMutex, lazy_lock::LazyLock, mutex::Mutex};
|
||||
use embassy_sync::{
|
||||
blocking_mutex::raw::CriticalSectionRawMutex, lazy_lock::LazyLock, mutex::Mutex,
|
||||
};
|
||||
use embassy_time::Timer;
|
||||
|
||||
pub mod keyboard;
|
||||
@@ -15,7 +17,7 @@ use crate::peripherals::keyboard::{configure_keyboard, read_keyboard_fifo};
|
||||
const MCU_ADDR: u8 = 0x1F;
|
||||
|
||||
type I2CBUS = I2c<'static, I2C1, Async>;
|
||||
pub static PERIPHERAL_BUS: LazyLock<Mutex<NoopRawMutex, Option<I2CBUS>>> =
|
||||
pub static PERIPHERAL_BUS: LazyLock<Mutex<CriticalSectionRawMutex, Option<I2CBUS>>> =
|
||||
LazyLock::new(|| Mutex::new(None));
|
||||
|
||||
const REG_ID_VER: u8 = 0x01;
|
||||
|
||||
@@ -23,8 +23,8 @@ impl<'d, 's, D: Driver<'d>> MassStorageClass<'d, D> {
|
||||
let mut interface = function.interface();
|
||||
let mut alt = interface.alt_setting(0x08, SUBCLASS_SCSI, 0x50, None);
|
||||
|
||||
let bulk_out = alt.endpoint_bulk_out(BULK_ENDPOINT_PACKET_SIZE as u16);
|
||||
let bulk_in = alt.endpoint_bulk_in(BULK_ENDPOINT_PACKET_SIZE as u16);
|
||||
let bulk_out = alt.endpoint_bulk_out(None, BULK_ENDPOINT_PACKET_SIZE as u16);
|
||||
let bulk_in = alt.endpoint_bulk_in(None, BULK_ENDPOINT_PACKET_SIZE as u16);
|
||||
|
||||
Self { bulk_out, bulk_in }
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ use core::str::FromStr;
|
||||
use embassy_rp::gpio::{Input, Output};
|
||||
use embassy_rp::peripherals::SPI0;
|
||||
use embassy_rp::spi::{Blocking, Spi};
|
||||
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
|
||||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
use embassy_sync::lazy_lock::LazyLock;
|
||||
use embassy_sync::mutex::Mutex;
|
||||
use embassy_time::Delay;
|
||||
@@ -25,7 +25,7 @@ type Vol<'a> = Volume<'a, SD, DummyTimeSource, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
|
||||
type Dir<'a> = Directory<'a, SD, DummyTimeSource, MAX_DIRS, MAX_FILES, MAX_VOLUMES>;
|
||||
pub type File<'a> = SdFile<'a, SD, DummyTimeSource, MAX_DIRS, MAX_FILES, MAX_VOLUMES>;
|
||||
|
||||
pub static SDCARD: LazyLock<Mutex<NoopRawMutex, Option<SdCard>>> =
|
||||
pub static SDCARD: LazyLock<Mutex<CriticalSectionRawMutex, Option<SdCard>>> =
|
||||
LazyLock::new(|| Mutex::new(None));
|
||||
|
||||
pub struct DummyTimeSource {}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
use crate::{
|
||||
TASK_STATE, TASK_STATE_CHANGED, TaskState,
|
||||
scsi::MassStorageClass,
|
||||
storage::{SDCARD, SdCard},
|
||||
};
|
||||
use crate::{TASK_STATE, TASK_STATE_CHANGED, TaskState, scsi::MassStorageClass};
|
||||
use embassy_futures::{
|
||||
join::join,
|
||||
select::{select, select3},
|
||||
};
|
||||
use embassy_rp::{peripherals::USB, usb::Driver};
|
||||
use embassy_sync::{blocking_mutex::raw::ThreadModeRawMutex, signal::Signal};
|
||||
use embassy_usb::{Builder, Config};
|
||||
use portable_atomic::AtomicBool;
|
||||
|
||||
pub async fn usb_handler(driver: Driver<'static, USB>) {
|
||||
let mut config = Config::new(0xc0de, 0xbabe);
|
||||
|
||||
Reference in New Issue
Block a user