bcm2835_sdhci/lib.rs
1//! sd card driver for raspi4,
2//! if you want to use it, change \[dev-dependencies\] in modules/axfs/Cargo.toml
3//! from axdriver = { path = "../axdriver", features = \["block", "ramdisk"\] } to axdriver = { path = "../axdriver", features = \["block", "mmc"\] }
4//! ans change \[features\] in modules/axruntime/Cargo.toml
5//! from "fs = \["alloc", "paging", "axdriver/virtio-blk", "dep:axfs"\]" to "fs = \["alloc", "paging", "axdriver/mmc", "dep:axfs"\]
6
7#![no_std]
8
9#[macro_use]
10extern crate log;
11pub mod Bcm2835SDhci;
12pub mod emmc;
13pub mod qa7_control;
14pub mod timer;
15
16pub enum SDHCIError {
17 /// An entity already exists.
18 AlreadyExists,
19 /// Try again, for non-blocking APIs.
20 Again,
21 /// Bad internal state.
22 BadState,
23 /// Invalid parameter/argument.
24 InvalidParam,
25 /// Input/output error.
26 Io,
27 /// Not enough space/cannot allocate memory (DMA).
28 NoMemory,
29 /// Device or resource is busy.
30 ResourceBusy,
31 /// This operation is unsupported or unimplemented.
32 Unsupported,
33}
34
35/// A specialized `Result` type for device operations.
36pub type SDHCIResult<T = ()> = Result<T, SDHCIError>;