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 {
|
impl SdReader {
|
||||||
/// Create SdReader from SdCard
|
/// Create SdReader from SdCard
|
||||||
pub fn new(sd: SdCard) -> SdReader {
|
pub fn new(sd: SdCard) -> SdReader {
|
||||||
|
debug!("creating new sd reader from sd card");
|
||||||
let mut vec: Vec<u8> = Vec::with_capacity(BLOCK_SIZE);
|
let mut vec: Vec<u8> = Vec::with_capacity(BLOCK_SIZE);
|
||||||
unsafe {
|
unsafe {
|
||||||
vec.set_len(vec.capacity());
|
vec.set_len(vec.capacity());
|
||||||
|
@ -186,6 +187,7 @@ impl SdReader {
|
||||||
mut self,
|
mut self,
|
||||||
entry: PartitionEntry,
|
entry: PartitionEntry,
|
||||||
) -> Result<fatfs::FileSystem<Self>, fatfs::Error<Error>> {
|
) -> Result<fatfs::FileSystem<Self>, fatfs::Error<Error>> {
|
||||||
|
debug!("mounting fatfs");
|
||||||
let mut buffer: [u8; 4] = [0; 4];
|
let mut buffer: [u8; 4] = [0; 4];
|
||||||
self.seek(SeekFrom::Start(0x1FE))?;
|
self.seek(SeekFrom::Start(0x1FE))?;
|
||||||
self.read_exact(&mut buffer[..2])?;
|
self.read_exact(&mut buffer[..2])?;
|
||||||
|
|
Loading…
Reference in New Issue