Skip to content

Commit 78bfedf

Browse files
Merge #286
286: Tidy lints for MDMA and OCTOSPI r=richardeoin a=richardeoin Co-authored-by: Richard Meadows <962920+richardeoin@users.noreply.github.com>
2 parents 0c1c9e7 + 106e7af commit 78bfedf

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

examples/ethernet-nucleo-h743zi2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use stm32h7xx_hal::hal::digital::v2::OutputPin;
1616
use stm32h7xx_hal::rcc::CoreClocks;
1717
use stm32h7xx_hal::{ethernet, ethernet::PHY};
1818
use stm32h7xx_hal::{prelude::*, stm32, stm32::interrupt};
19-
use Speed::*;
2019

2120
/// Configure SYSTICK for 1ms timebase
2221
fn systick_init(syst: &mut stm32::SYST, clocks: CoreClocks) {

src/dma/mdma.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,11 @@ impl Default for MdmaIncrement {
228228
}
229229

230230
/// MDMA burst size. This type contains the _register_ value, thus the burst
231-
/// size is equal to 2^N where N is the register value
232-
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
231+
/// size is equal to 2^N where N is the register value.
232+
///
233+
/// The derived Default implementation gives a burst size of 2^0 = 1
234+
#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord)]
233235
pub struct MdmaBurstSize(pub(crate) u8);
234-
impl Default for MdmaBurstSize {
235-
fn default() -> Self {
236-
MdmaBurstSize(0)
237-
}
238-
}
239236
impl MdmaBurstSize {
240237
// TODO: add const to make this a const fn
241238
fn from_size(mut v: usize) -> Self {
@@ -1240,7 +1237,9 @@ mdma_stream!(
12401237
(Stream15, ch15, 15),
12411238
);
12421239

1240+
#[cfg(not(feature = "rm0455"))] // TODO remove
12431241
type P2M = PeripheralToMemory;
1242+
#[cfg(not(feature = "rm0455"))] // TODO remove
12441243
type M2P = MemoryToPeripheral;
12451244

12461245
// Access the QSPI data register as a u32 for bus access efficiency. The MDMA

src/xspi/octospi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//!
33
//! See the parent module for documentation
44
5+
#[allow(unused)] // TODO remove
56
use crate::{
67
gpio::{
78
gpioa::{PA1, PA2, PA3, PA6, PA7},

0 commit comments

Comments
 (0)