From f77013c290a326080b1c14b7787cb1c0004c95f0 Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 17 Sep 2020 11:48:32 +0800 Subject: [PATCH] fpga config: fix unwrap bug --- examples/fpga_config.rs | 2 +- src/flash.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/fpga_config.rs b/examples/fpga_config.rs index 996406f..b050d87 100644 --- a/examples/fpga_config.rs +++ b/examples/fpga_config.rs @@ -79,7 +79,7 @@ fn main() -> ! { // Pre-load the configuration bytes let config_data = include_bytes!("../build/top.bin"); - flash_ice40_fpga(fpga_cfg_spi, fpga_ss, fpga_creset, fpga_cdone, delay, config_data)?; + flash_ice40_fpga(fpga_cfg_spi, fpga_ss, fpga_creset, fpga_cdone, delay, config_data).unwrap(); loop { nop(); diff --git a/src/flash.rs b/src/flash.rs index ee6c166..ca3aa45 100644 --- a/src/flash.rs +++ b/src/flash.rs @@ -13,6 +13,7 @@ use nb::block; use log::{warn, debug}; +#[derive(Debug)] pub enum FPGAFlashError { SPICommunicationError, NegotiationError,