Moving ownership of hardware cs

This commit is contained in:
Ryan Summers 2021-06-14 18:51:49 +02:00
parent d6ccf1cc83
commit c96999de52
1 changed files with 8 additions and 8 deletions

View File

@ -332,7 +332,7 @@ pub fn setup(
.pb10
.into_alternate_af5()
.set_speed(hal::gpio::Speed::VeryHigh);
let _spi_nss = gpiob
let spi_nss = gpiob
.pb9
.into_alternate_af5()
.set_speed(hal::gpio::Speed::VeryHigh);
@ -350,7 +350,7 @@ pub fn setup(
.communication_mode(hal::spi::CommunicationMode::Receiver);
let spi: hal::spi::Spi<_, _, u16> = device.SPI2.spi(
(spi_sck, spi_miso, hal::spi::NoMosi),
(spi_sck, spi_miso, hal::spi::NoMosi, spi_nss),
config,
design_parameters::ADC_DAC_SCK_MAX,
ccdr.peripheral.SPI2,
@ -376,7 +376,7 @@ pub fn setup(
.pc10
.into_alternate_af6()
.set_speed(hal::gpio::Speed::VeryHigh);
let _spi_nss = gpioa
let spi_nss = gpioa
.pa15
.into_alternate_af6()
.set_speed(hal::gpio::Speed::VeryHigh);
@ -394,7 +394,7 @@ pub fn setup(
.communication_mode(hal::spi::CommunicationMode::Receiver);
let spi: hal::spi::Spi<_, _, u16> = device.SPI3.spi(
(spi_sck, spi_miso, hal::spi::NoMosi),
(spi_sck, spi_miso, hal::spi::NoMosi, spi_nss),
config,
design_parameters::ADC_DAC_SCK_MAX,
ccdr.peripheral.SPI3,
@ -430,7 +430,7 @@ pub fn setup(
.pe2
.into_alternate_af5()
.set_speed(hal::gpio::Speed::VeryHigh);
let _spi_nss = gpioe
let spi_nss = gpioe
.pe4
.into_alternate_af5()
.set_speed(hal::gpio::Speed::VeryHigh);
@ -448,7 +448,7 @@ pub fn setup(
.swap_mosi_miso();
device.SPI4.spi(
(spi_sck, spi_miso, hal::spi::NoMosi),
(spi_sck, spi_miso, hal::spi::NoMosi, spi_nss),
config,
design_parameters::ADC_DAC_SCK_MAX,
ccdr.peripheral.SPI4,
@ -465,7 +465,7 @@ pub fn setup(
.pf7
.into_alternate_af5()
.set_speed(hal::gpio::Speed::VeryHigh);
let _spi_nss = gpiof
let spi_nss = gpiof
.pf6
.into_alternate_af5()
.set_speed(hal::gpio::Speed::VeryHigh);
@ -483,7 +483,7 @@ pub fn setup(
.swap_mosi_miso();
device.SPI5.spi(
(spi_sck, spi_miso, hal::spi::NoMosi),
(spi_sck, spi_miso, hal::spi::NoMosi, spi_nss),
config,
design_parameters::ADC_DAC_SCK_MAX,
ccdr.peripheral.SPI5,