Skip to content

Incorrect GPIO documentation #861

@daniel-mooney

Description

@daniel-mooney

These pertains to the official doc.rs page which can be found here. I was unsure where else I could make an issue.

The example for accessing a GPIO pin is given as:

// Acquire the GPIOC peripheral
// NOTE: `dp` is the device peripherals from the `PAC` crate
let mut gpioa = dp.GPIOA.split();

To my best knowledge, this is incorrect. split() must recieve an argument for the Reset and Clock Control:

pub trait GpioExt {
    type Parts;

    // Required method
    fn split(self, rcc: &mut RCC) -> Self::Parts;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions