forked from M-Labs/kirdy
AD7172: correct wrong NSS pinout definition
This commit is contained in:
parent
c768bdc93a
commit
381f25f036
|
@ -132,7 +132,7 @@ pub fn setup(
|
||||||
ad7172::SPI_CLOCK_MHZ.convert(),
|
ad7172::SPI_CLOCK_MHZ.convert(),
|
||||||
&clocks
|
&clocks
|
||||||
),
|
),
|
||||||
gpiod.pd0.into_push_pull_output(),
|
gpioa.pa15.into_push_pull_output(),
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
(eth_pins, usb, current_source_phy, ad7172_phy, max1968_phy)
|
(eth_pins, usb, current_source_phy, ad7172_phy, max1968_phy)
|
||||||
|
|
|
@ -4,7 +4,7 @@ use stm32f4xx_hal::
|
||||||
{
|
{
|
||||||
spi::{Spi, TransferModeNormal},
|
spi::{Spi, TransferModeNormal},
|
||||||
pac::SPI3,
|
pac::SPI3,
|
||||||
gpio::{PC10, PC11, PC12, PD0, Alternate, Output, PushPull},
|
gpio::{PC10, PC11, PC12, PA15, Alternate, Output, PushPull},
|
||||||
hal::{
|
hal::{
|
||||||
blocking::spi::Transfer,
|
blocking::spi::Transfer,
|
||||||
digital::v2::OutputPin,
|
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 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>;
|
pub type AdcPhy = Adc<AdcSpi, AdcNss>;
|
||||||
|
|
||||||
impl<SPI: Transfer<u8, Error = E>, NSS: OutputPin, E: fmt::Debug> Adc<SPI, NSS> {
|
impl<SPI: Transfer<u8, Error = E>, NSS: OutputPin, E: fmt::Debug> Adc<SPI, NSS> {
|
||||||
|
|
Loading…
Reference in New Issue