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/).
1717- Use independent ` Spi ` and ` SpiSlave ` structures instead of ` OP ` generic [ #462 ]
1818- Take ` &Clocks ` instead of ` Clocks ` [ #498 ]
1919- 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 ]
2122- move ` Qei ` mod inside ` pwm_input ` mod [ #516 ]
2223
2324### Changed
Original file line number Diff line number Diff line change 66 As some STM32F1xx chips have 5V tolerant SPI pins, it is also possible to configure Sck and Mosi outputs as `Alternate<PushPull>`. Then
77 a simple Pull-Up to 5V can be used to use SPI on a 5V bus without a level shifter.
88
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
1010
1111 ## Alternate function remapping
1212
@@ -133,7 +133,14 @@ pub enum Error {
133133
134134use core:: marker:: PhantomData ;
135135
136+ #[ allow( non_upper_case_globals) ]
136137pub 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 ;
137144 fn spi < PULL : UpMode > (
138145 self ,
139146 pins : (
You can’t perform that action at this time.
0 commit comments