|
53 | 53 | //! [split](AnyPin::split) into signals. In this case you need to carefully |
54 | 54 | //! ensure that only a single driver configures the split pin, by selectively |
55 | 55 | //! [freezing](`InputSignal::freeze`) the signals. |
56 | | -//! |
57 | | -//! For example, if you want to route GPIO3 to both a Pulse Counter |
58 | | -//! input and a [UART](crate::uart::Uart) RX line, you will need to make sure |
59 | | -//! one of the signals is frozen, otherwise the driver that is configured later |
60 | | -//! will overwrite the other driver's configuration. Configuring the signals on |
61 | | -//! multiple cores is undefined behaviour unless you ensure the configuration |
62 | | -//! does not happen at the same time. |
63 | | -//! |
| 56 | +# RX line, you will need to make sure |
| 60 | + one of the signals is frozen, otherwise the driver that is configured later |
| 61 | + will overwrite the other driver's configuration. Configuring the signals on |
| 62 | + multiple cores is undefined behaviour unless you ensure the configuration |
| 63 | + does not happen at the same time." |
| 64 | +)] |
64 | 65 | //! ### Using pins and signals |
65 | 66 | //! |
66 | 67 | //! A GPIO pin can be configured either with a GPIO driver such as [`Input`], or |
67 | 68 | //! by a peripheral driver using a pin assignment method such as |
68 | | -//! [`Spi::with_mosi`]. The peripheral drivers' preferences can be overridden by |
| 69 | +#![cfg_attr(spi_master_driver_supported, doc = "[`Spi::with_mosi`].")] |
| 70 | +#![cfg_attr(not(spi_master_driver_supported), doc = "`Spi::with_mosi`.")] |
| 71 | +//! The peripheral drivers' preferences can be overridden by |
69 | 72 | //! passing a pin driver to the peripheral driver. When converting a driver to |
70 | 73 | //! signals, the underlying signals will be initially |
71 | 74 | //! [frozen](InputSignal::freeze) to support this use case. |
|
93 | 96 | //! - A GPIO output can be driven by only one peripheral output. |
94 | 97 | //! |
95 | 98 | //! [`GPIO0`]: crate::peripherals::GPIO0 |
96 | | -//! [`Spi::with_mosi`]: crate::spi::master::Spi::with_mosi |
| 99 | +#![cfg_attr( |
| 100 | + spi_master_driver_supported, |
| 101 | + doc = "[`Spi::with_mosi`]: crate::spi::master::Spi::with_mosi" |
| 102 | +)] |
97 | 103 |
|
98 | 104 | #[cfg(feature = "unstable")] |
99 | 105 | use crate::gpio::{Input, Output}; |
|
0 commit comments