From cf17a1c60a667bcc68772224d2fa98f1cf3fceee Mon Sep 17 00:00:00 2001 From: pca006132 Date: Wed, 10 Jun 2020 12:55:22 +0800 Subject: [PATCH] removed unneeded methods --- experiments/src/main.rs | 2 +- libboard_zynq/src/sdio/adma.rs | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/experiments/src/main.rs b/experiments/src/main.rs index 32c91b5..6fa9b79 100644 --- a/experiments/src/main.rs +++ b/experiments/src/main.rs @@ -83,7 +83,7 @@ pub fn main_core0() { clocks.cpu_1x() ); - let mut sd = libboard_zynq::sdio::SDIO::sdio0(true); + let sd = libboard_zynq::sdio::SDIO::sdio0(true); // only test SD card if it is inserted if sd.is_card_inserted() { let result = SdCard::from_sdio(sd); diff --git a/libboard_zynq/src/sdio/adma.rs b/libboard_zynq/src/sdio/adma.rs index 82b4bf3..bcdc424 100644 --- a/libboard_zynq/src/sdio/adma.rs +++ b/libboard_zynq/src/sdio/adma.rs @@ -37,29 +37,17 @@ impl Adma2Desc32 { } } - pub fn get_attribute(&mut self) -> u16 { - unsafe { core::ptr::read_volatile(&mut self.attribute as *mut u16) } - } - pub fn set_length(&mut self, length: u16) { unsafe { core::ptr::write_volatile(&mut self.length as *mut u16, length); } } - pub fn get_length(&mut self) -> u16 { - unsafe { core::ptr::read_volatile(&mut self.length as *mut u16) } - } - pub fn set_address(&mut self, address: u32) { unsafe { core::ptr::write_volatile(&mut self.address as *mut u32, address); } } - - pub fn get_address(&mut self) -> u32 { - unsafe { core::ptr::read_volatile(&mut self.address as *mut u32) } - } } pub fn setup_adma2_descr32(sdio: &mut SDIO, blk_cnt: u32, buffer: &[u8]) {