From ec252b099cf67a51ba9daa72b3292db8c21ba1b8 Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 26 Jun 2020 23:27:28 +0200 Subject: [PATCH] experiments: don't write raw blocks to the sdcard by default --- experiments/src/main.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/experiments/src/main.rs b/experiments/src/main.rs index 615c09c..3eabf33 100644 --- a/experiments/src/main.rs +++ b/experiments/src/main.rs @@ -41,7 +41,7 @@ const HWADDR: [u8; 6] = [0, 0x23, 0xde, 0xea, 0xbe, 0xef]; pub fn main_core0() { // zynq::clocks::CpuClocks::enable_io(1_250_000_000); println!("\nzc706 main"); - ps7_init::apply(); + // ps7_init::apply(); libboard_zynq::stdio::drop_uart(); libboard_zynq::logger::init().unwrap(); @@ -93,16 +93,13 @@ pub fn main_core0() { }; const SIZE: usize = 512 * 2 + 1; let mut sd_card = result.unwrap(); - { + if false { let buffer: [u8; SIZE] = [5; SIZE]; sd_card.write_block(0x0, 2, &buffer).unwrap(); } let mut buffer: [u8; SIZE] = [0; SIZE]; - sd_card.read_block(0x1, 2, &mut buffer[1..]).unwrap(); - for i in 0..buffer.len() { - info!("buffer[{}] = {}", i, buffer[i]); - } - info!("End"); + sd_card.read_block(0 /*0x1*/, 2, &mut buffer[1..]).unwrap(); + info!("buffer = {:?}", &buffer[..]); } let mut flash = zynq::flash::Flash::new(200_000_000).linear_addressing_mode();