forked from M-Labs/zynq-rs
add debug (remove later)
This commit is contained in:
parent
d76f6fee0e
commit
579ae79ea3
|
@ -93,6 +93,7 @@ pub enum PartitionEntry {
|
|||
impl SdReader {
|
||||
/// Create SdReader from SdCard
|
||||
pub fn new(sd: SdCard) -> SdReader {
|
||||
debug!("creating new sd reader from sd card");
|
||||
let mut vec: Vec<u8> = Vec::with_capacity(BLOCK_SIZE);
|
||||
unsafe {
|
||||
vec.set_len(vec.capacity());
|
||||
|
@ -186,6 +187,7 @@ impl SdReader {
|
|||
mut self,
|
||||
entry: PartitionEntry,
|
||||
) -> Result<fatfs::FileSystem<Self>, fatfs::Error<Error>> {
|
||||
debug!("mounting fatfs");
|
||||
let mut buffer: [u8; 4] = [0; 4];
|
||||
self.seek(SeekFrom::Start(0x1FE))?;
|
||||
self.read_exact(&mut buffer[..2])?;
|
||||
|
|
Loading…
Reference in New Issue