|
7 | 7 |
|
8 | 8 | pub mod proto; |
9 | 9 |
|
10 | | -use super::{Block, BlockCount, BlockDevice, BlockIdx}; |
| 10 | +use crate::{trace, Block, BlockCount, BlockDevice, BlockIdx}; |
11 | 11 | use core::cell::RefCell; |
12 | 12 | use proto::*; |
13 | 13 |
|
14 | 14 | // ============================================================================= |
15 | 15 | // Imports |
16 | 16 | // ============================================================================= |
17 | 17 |
|
18 | | -#[cfg(feature = "log")] |
19 | | -use log::{debug, trace, warn}; |
20 | | - |
21 | | -#[cfg(feature = "defmt-log")] |
22 | | -use defmt::{debug, trace, warn}; |
23 | | - |
24 | | -#[cfg(all(feature = "defmt-log", feature = "log"))] |
25 | | -compile_error!("Cannot enable both log and defmt-log"); |
26 | | - |
27 | | -#[cfg(all(not(feature = "defmt-log"), not(feature = "log")))] |
28 | | -compile_error!("Must enable either log or defmt-log"); |
| 18 | +use crate::{debug, warn}; |
29 | 19 |
|
30 | 20 | // ============================================================================= |
31 | 21 | // Constants |
@@ -141,14 +131,14 @@ where |
141 | 131 | &self, |
142 | 132 | blocks: &mut [Block], |
143 | 133 | start_block_idx: BlockIdx, |
144 | | - reason: &str, |
| 134 | + _reason: &str, |
145 | 135 | ) -> Result<(), Self::Error> { |
146 | 136 | let mut inner = self.inner.borrow_mut(); |
147 | 137 | debug!( |
148 | 138 | "Read {} blocks @ {} for {}", |
149 | 139 | blocks.len(), |
150 | 140 | start_block_idx.0, |
151 | | - reason |
| 141 | + _reason |
152 | 142 | ); |
153 | 143 | inner.check_init()?; |
154 | 144 | inner.read(blocks, start_block_idx) |
@@ -415,9 +405,9 @@ where |
415 | 405 | Ok(R1_IDLE_STATE) => { |
416 | 406 | break; |
417 | 407 | } |
418 | | - Ok(r) => { |
| 408 | + Ok(_r) => { |
419 | 409 | // Try again |
420 | | - warn!("Got response: {:x}, trying again..", r); |
| 410 | + warn!("Got response: {:x}, trying again..", _r); |
421 | 411 | } |
422 | 412 | } |
423 | 413 |
|
|
0 commit comments