From d12abc976a7ec2b232c9e37c409144f129ecbeff Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Tue, 1 Oct 2024 06:36:31 +0000 Subject: [PATCH] Fix the build for ESP IDF 4.4.X --- src/spi.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/spi.rs b/src/spi.rs index 0f864eafc5..5d0b40e494 100644 --- a/src/spi.rs +++ b/src/spi.rs @@ -437,7 +437,13 @@ impl<'d> SpiDriver<'d> { sdi: Option + 'd>, config: &config::DriverConfig, ) -> Result { - let max_transfer_size = Self::new_internal(SPI1::device(), Some(sclk), sdo, sdi, config)?; + let max_transfer_size = Self::new_internal( + SPI1::device(), + Some(sclk.into_ref().pin()), + sdo.into_ref().pin(), + sdi.map(|p| p.into_ref().pin()), + config, + )?; Ok(Self { host: SPI1::device() as _,