ESP
This commit is contained in:
parent
a4884bd189
commit
865599e059
64 changed files with 6448 additions and 1221 deletions
29
src/fs.rs
29
src/fs.rs
|
|
@ -1,29 +0,0 @@
|
|||
use atsamd_hal::{delay::Delay, pac::Peripherals, prelude::*, sercom::spi::EightBit};
|
||||
use embedded_sdmmc::{Controller, SdMmcSpi, VolumeIdx};
|
||||
|
||||
pub struct Fs {
|
||||
controller: Controller<SdMmcSpi<maduino_zero_4g::SdSpi, maduino_zero_4g::SdCs>, ClockMock>,
|
||||
}
|
||||
|
||||
impl Fs {
|
||||
pub fn new(spi: maduino_zero_4g::SdSpi, cs: maduino_zero_4g::SdCs) -> Self {
|
||||
let controller = Controller::new(SdMmcSpi::new(spi, cs), ClockMock);
|
||||
Self { controller }
|
||||
}
|
||||
}
|
||||
|
||||
struct ClockMock;
|
||||
|
||||
// TODO
|
||||
impl embedded_sdmmc::TimeSource for ClockMock {
|
||||
fn get_timestamp(&self) -> embedded_sdmmc::Timestamp {
|
||||
embedded_sdmmc::Timestamp {
|
||||
year_since_1970: 0,
|
||||
zero_indexed_month: 0,
|
||||
zero_indexed_day: 0,
|
||||
hours: 0,
|
||||
minutes: 0,
|
||||
seconds: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue