File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
17
17
- Use independent ` Spi ` and ` SpiSlave ` structures instead of ` OP ` generic [ #462 ]
18
18
- Take ` &Clocks ` instead of ` Clocks ` [ #498 ]
19
19
- Update to ` stm32f1 ` v0.16.0 [ #503 ] [ #534 ]
20
- - ` Spi ` now takes ` Option<PIN> ` for ` SCK ` , ` MISO ` , ` MOSI ` [ #514 ]
20
+ - ` Spi ` now takes ` Option<PIN> ` for ` SCK ` , ` MISO ` , ` MOSI ` [ #514 ] ,
21
+ add ` SPIx::NoSck ` , etc. [ #537 ]
21
22
- move ` Qei ` mod inside ` pwm_input ` mod [ #516 ]
22
23
23
24
### Changed
Original file line number Diff line number Diff line change 6
6
As some STM32F1xx chips have 5V tolerant SPI pins, it is also possible to configure Sck and Mosi outputs as `Alternate<PushPull>`. Then
7
7
a simple Pull-Up to 5V can be used to use SPI on a 5V bus without a level shifter.
8
8
9
- You can also use `None::<PA6>` if you don't want to use the pins
9
+ You can also use `None::<PA6>` or `SPI1::NoMiso` if you don't want to use the pins
10
10
11
11
## Alternate function remapping
12
12
@@ -133,7 +133,14 @@ pub enum Error {
133
133
134
134
use core:: marker:: PhantomData ;
135
135
136
+ #[ allow( non_upper_case_globals) ]
136
137
pub trait SpiExt : Sized + Instance {
138
+ const NoSck : Option < Self :: MSck > = None ;
139
+ const NoMiso : Option < Self :: Mi < Floating > > = None ;
140
+ const NoMosi : Option < Self :: Mo > = None ;
141
+ const NoSSck : Option < Self :: SSck > = None ;
142
+ const NoSo : Option < Self :: So < PushPull > > = None ;
143
+ const NoSi : Option < Self :: Si < Floating > > = None ;
137
144
fn spi < PULL : UpMode > (
138
145
self ,
139
146
pins : (
You can’t perform that action at this time.
0 commit comments