Skip to content

Commit 7e25fdd

Browse files
authored
Merge pull request #525 from ia0/fix
Use correct port for SPI on 52xxx
2 parents dcf6c1e + a26040e commit 7e25fdd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nrf-hal-common/src/spi.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ where
172172
#[cfg(not(feature = "51"))]
173173
fn set_pins(spi: &mut T, pins: Pins) {
174174
if let Some(ref pin) = pins.sck {
175-
spi.psel.sck.write(|w| unsafe { w.bits(pin.pin().into()) });
175+
spi.psel.sck.write(|w| unsafe { w.bits(pin.psel_bits()) });
176176
}
177177
if let Some(ref pin) = pins.mosi {
178-
spi.psel.mosi.write(|w| unsafe { w.bits(pin.pin().into()) });
178+
spi.psel.mosi.write(|w| unsafe { w.bits(pin.psel_bits()) });
179179
}
180180
if let Some(ref pin) = pins.miso {
181-
spi.psel.miso.write(|w| unsafe { w.bits(pin.pin().into()) });
181+
spi.psel.miso.write(|w| unsafe { w.bits(pin.psel_bits()) });
182182
}
183183
}
184184

0 commit comments

Comments
 (0)