Merge branch 'mueller/spi-doc-fixes'

This commit is contained in:
Robin Müller 2021-11-21 20:26:04 +01:00
commit d08f936948

View File

@ -363,25 +363,18 @@ macro_rules! spi {
{ {
/// Create a new SPI struct /// Create a new SPI struct
/// ///
/// This function has the optional feature to transfer the configuration. /// You can delete the pin type information by calling the
/// This configuration struct requires a generic type information to enforce /// [`downgrade`](Self::downgrade) function
/// the correct configuration of hardware chip select pins. If you are not using
/// this feature you can use
///
/// ```
/// let spia = Spi::spia::<NoneT>(
/// ...
/// )
/// ```
///
/// in the function call. You can delete the pin type information by calling
/// the [`downgrade`](Self::downgrade) function
/// ///
/// ## Arguments /// ## Arguments
/// * `transfer_cfg` - Transfer configuration which includes configuration /// * `spi` - SPI bus to use
/// which can change across individual SPI transfers like SPI mode or SPI clock. /// * `pins` - Pins to be used for SPI transactions. These pins are consumed
/// If only one device is connected, this configuration only needs to be done /// to ensure the pins can not be used for other purposes anymore
/// once. /// * `spi_cfg` - Configuration specific to the SPI bus
/// * `transfer_cfg` - Optional initial transfer configuration which includes
/// configuration which can change across individual SPI transfers like SPI mode
/// or SPI clock. If only one device is connected, this configuration only needs
/// to be done once.
/// * `syscfg` - Can be passed optionally to enable the peripheral clock /// * `syscfg` - Can be passed optionally to enable the peripheral clock
pub fn $spix( pub fn $spix(
spi: $SPIX, spi: $SPIX,