mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-02-23 23:57:43 +11:00
(Hopefully) Improved documentation of bsp_pins!()
This commit is contained in:
parent
f4a4b80459
commit
9e84c961a8
1 changed files with 21 additions and 0 deletions
|
@ -1088,6 +1088,27 @@ macro_rules! bsp_pins {
|
|||
///
|
||||
/// This type is intended to provide more meaningful names for the
|
||||
/// given pins.
|
||||
///
|
||||
/// To enable specific functions of the pins you can use the
|
||||
/// [rp2040_hal::gpio::pin::Pin::into_mode] function with
|
||||
/// one of:
|
||||
/// - [rp2040_hal::gpio::pin::FunctionI2C]
|
||||
/// - [rp2040_hal::gpio::pin::FunctionPwm]
|
||||
/// - [rp2040_hal::gpio::pin::FunctionSpi]
|
||||
/// - [rp2040_hal::gpio::pin::FunctionXip]
|
||||
/// - [rp2040_hal::gpio::pin::FunctionPio0]
|
||||
/// - [rp2040_hal::gpio::pin::FunctionPio1]
|
||||
/// - [rp2040_hal::gpio::pin::FunctionUart]
|
||||
///
|
||||
/// like this:
|
||||
///```no_run
|
||||
/// let _spi_sclk = pins.gpio2.into_mode::<gpio::FunctionSpi>();
|
||||
/// let _spi_mosi = pins.gpio3.into_mode::<gpio::FunctionSpi>();
|
||||
/// let _spi_miso = pins.gpio4.into_mode::<gpio::FunctionSpi>();
|
||||
///```
|
||||
///
|
||||
/// **See also [rp2040_hal::gpio::pin] for more in depth information
|
||||
/// about this**!
|
||||
pub struct Pins {
|
||||
$(
|
||||
$( #[$id_cfg] )*
|
||||
|
|
Loading…
Add table
Reference in a new issue