Fix warnings for embassy-stm32 and embassy-stm32-examples
This commit is contained in:
@ -7,6 +7,7 @@ pub use _version::*;
|
||||
|
||||
use crate::gpio::Pin;
|
||||
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum Error {
|
||||
Framing,
|
||||
Crc,
|
||||
|
@ -19,7 +19,6 @@ impl WordSize {
|
||||
}
|
||||
|
||||
pub struct Spi<'d, T: Instance> {
|
||||
//peri: T,
|
||||
sck: AnyPin,
|
||||
mosi: AnyPin,
|
||||
miso: AnyPin,
|
||||
@ -30,7 +29,7 @@ pub struct Spi<'d, T: Instance> {
|
||||
impl<'d, T: Instance> Spi<'d, T> {
|
||||
pub fn new<F>(
|
||||
pclk: Hertz,
|
||||
peri: impl Unborrow<Target = T> + 'd,
|
||||
_peri: impl Unborrow<Target = T> + 'd,
|
||||
sck: impl Unborrow<Target = impl SckPin<T>>,
|
||||
mosi: impl Unborrow<Target = impl MosiPin<T>>,
|
||||
miso: impl Unborrow<Target = impl MisoPin<T>>,
|
||||
@ -40,7 +39,7 @@ impl<'d, T: Instance> Spi<'d, T> {
|
||||
where
|
||||
F: Into<Hertz>,
|
||||
{
|
||||
unborrow!(peri, sck, mosi, miso);
|
||||
unborrow!(sck, mosi, miso);
|
||||
|
||||
unsafe {
|
||||
sck.set_as_af(sck.af_num());
|
||||
@ -89,7 +88,6 @@ impl<'d, T: Instance> Spi<'d, T> {
|
||||
}
|
||||
|
||||
Self {
|
||||
//peri,
|
||||
sck,
|
||||
mosi,
|
||||
miso,
|
||||
|
Reference in New Issue
Block a user