@@ -171,9 +171,58 @@ spi_pins! {
171171 }
172172}
173173
174+ /// Filler for a SCK pin
175+ ///
176+ /// Usefull if you don't want to utilize the sck pin,
177+ /// but a pin parameter is required
178+ pub struct NoSck {
179+ _1 : ( ) ,
180+ }
181+
182+ impl NoSck {
183+ /// Create a new filler sck pin
184+ pub unsafe fn new ( ) -> Self {
185+ Self { _1 : ( ) }
186+ }
187+ }
188+
189+ /// Filler for a MISO Pin
190+ ///
191+ /// Usefull if you don't want to utilize the miso pin,
192+ /// but a pin parameter is required
193+ pub struct NoMiso {
194+ _1 : ( ) ,
195+ }
196+
197+ impl NoMiso {
198+ /// Create a new filler mosi pin
199+ pub unsafe fn new ( ) -> Self {
200+ Self { _1 : ( ) }
201+ }
202+ }
203+
204+ /// Filler for a MOSI Pin
205+ ///
206+ /// Usefull if you don't want to utilize the miso pin,
207+ /// but a pin parameter is required
208+ pub struct NoMosi {
209+ _1 : ( ) ,
210+ }
211+
212+ impl NoMosi {
213+ /// Create a new filler mosi pin
214+ pub unsafe fn new ( ) -> Self {
215+ Self { _1 : ( ) }
216+ }
217+ }
218+
174219macro_rules! spi {
175220 ( $( $SPI: ident: ( $spi: ident, $spiXen: ident, $spiXrst: ident, $apbenr: ident, $apbrstr: ident) , ) +) => {
176221 $(
222+ impl SckPin <$SPI> for NoSck { }
223+ impl MisoPin <$SPI> for NoMiso { }
224+ impl MosiPin <$SPI> for NoMosi { }
225+
177226 impl <SCKPIN , MISOPIN , MOSIPIN > Spi <$SPI, SCKPIN , MISOPIN , MOSIPIN > {
178227 /// Creates a new spi instance
179228 pub fn $spi<F >(
0 commit comments