You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/spi.rs
+42-20Lines changed: 42 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,34 @@
1
1
/*!
2
2
# Serial Peripheral Interface
3
+
To construct the SPI instances, use the `Spi::spiX` functions.
3
4
4
-
## Alternate function remapping
5
+
The pin parameter is a tuple containing `(sck, miso, mosi)` which should be configured as `(Alternate<PushPull>, Input<Floating>, Alternate<PushPull>)`.
5
6
6
-
### SPI1
7
+
You can also use `NoSck`, `NoMiso` or `NoMosi` if you don't want to use the pins
7
8
8
-
| Function | Spi1NoRemap | Spi1Remap |
9
-
|:----:|:-----------:|:---------:|
10
-
| SCK | PA5 | PB3 |
11
-
| MISO | PA6 | PB4 |
12
-
| MOSI | PA7 | PB5 |
9
+
- `SPI1` can use `(PA5, PA6, PA7)` or `(PB3, PB4, PB5)`.
10
+
- `SPI2` can use `(PB13, PB14, PB15)`
11
+
- `SPI3` can use `(PB3, PB4, PB5)` or `(PC10, PC11, PC12)`
The pin parameter tuple (sck, miso, mosi) should be `(PA5, PA6, PA7)` or `(PB3, PB4, PB5)` configured as `(Alternate<PushPull>, Input<Floating>, Alternate<PushPull>)`.
155
+
156
+
You can also use `NoSck`, `NoMiso` or `NoMosi` if you don't want to use the pins
The pin parameter tuple (sck, miso, mosi) should be `(PB3, PB4, PB5)` or `(PC10, PC11, PC12)` configured as `(Alternate<PushPull>, Input<Floating>, Alternate<PushPull>)`.
208
+
209
+
You can also use `NoSck`, `NoMiso` or `NoMosi` if you don't want to use the pins
0 commit comments