forked from M-Labs/zynq-rs
removed unneeded methods
This commit is contained in:
parent
5332587de6
commit
cf17a1c60a
@ -83,7 +83,7 @@ pub fn main_core0() {
|
|||||||
clocks.cpu_1x()
|
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
|
// only test SD card if it is inserted
|
||||||
if sd.is_card_inserted() {
|
if sd.is_card_inserted() {
|
||||||
let result = SdCard::from_sdio(sd);
|
let result = SdCard::from_sdio(sd);
|
||||||
|
@ -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) {
|
pub fn set_length(&mut self, length: u16) {
|
||||||
unsafe {
|
unsafe {
|
||||||
core::ptr::write_volatile(&mut self.length as *mut u16, length);
|
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) {
|
pub fn set_address(&mut self, address: u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
core::ptr::write_volatile(&mut self.address as *mut u32, address);
|
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]) {
|
pub fn setup_adma2_descr32(sdio: &mut SDIO, blk_cnt: u32, buffer: &[u8]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user