This commit is contained in:
Pascal Engélibert 2023-10-07 13:33:14 +02:00
commit 865599e059
64 changed files with 6448 additions and 1221 deletions

View file

@ -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,
}
}
}