AD7172: correct wrong NSS pinout definition

master
linuswck 2024-01-24 11:19:47 +08:00
parent c768bdc93a
commit 381f25f036
2 changed files with 3 additions and 3 deletions

View File

@ -132,7 +132,7 @@ pub fn setup(
ad7172::SPI_CLOCK_MHZ.convert(),
&clocks
),
gpiod.pd0.into_push_pull_output(),
gpioa.pa15.into_push_pull_output(),
).unwrap();
(eth_pins, usb, current_source_phy, ad7172_phy, max1968_phy)

View File

@ -4,7 +4,7 @@ use stm32f4xx_hal::
{
spi::{Spi, TransferModeNormal},
pac::SPI3,
gpio::{PC10, PC11, PC12, PD0, Alternate, Output, PushPull},
gpio::{PC10, PC11, PC12, PA15, Alternate, Output, PushPull},
hal::{
blocking::spi::Transfer,
digital::v2::OutputPin,
@ -30,7 +30,7 @@ pub struct Adc<SPI: Transfer<u8>, NSS: OutputPin> {
}
type AdcSpi = Spi<SPI3, (PC10<Alternate<6>>, PC11<Alternate<6>>, PC12<Alternate<6>>), TransferModeNormal>;
type AdcNss = PD0<Output<PushPull>>;
type AdcNss = PA15<Output<PushPull>>;
pub type AdcPhy = Adc<AdcSpi, AdcNss>;
impl<SPI: Transfer<u8, Error = E>, NSS: OutputPin, E: fmt::Debug> Adc<SPI, NSS> {