Skip to content

Commit

Permalink
docs: cargo doc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
techmccat committed Aug 13, 2024
1 parent 6212c61 commit 155b53f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions src/adc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Analog to digital converter configuration.
//! https://github.com/stm32-rs/stm32l4xx-hal/blob/master/src/adc.rs
//! <https://github.com/stm32-rs/stm32l4xx-hal/blob/master/src/adc.rs>
#![deny(missing_docs)]

Expand Down Expand Up @@ -310,7 +310,8 @@ pub mod config {
pub enum ClockMode {
/// (Asynchronous clock mode), adc_ker_ck. generated at product level (refer to Section 6: Reset and clock control (RCC)
Asynchronous,
/// (Synchronous clock mode). adc_hclk/1 This configuration must be enabled only if the AHB clock prescaler is set to 1 (HPRE[3:0] = 0xxx in RCC_CFGR register) and if the system clock has a 50% duty cycle.
/// (Synchronous clock mode). adc_hclk/1
/// This configuration must be enabled only if the AHB clock prescaler is set to 1 (HPRE\[3:0\] = 0xxx in RCC_CFGR register) and if the system clock has a 50% duty cycle.
Synchronous_Div_1,
/// Synchronous clock mode. adc_hclk/2
Synchronous_Div_2,
Expand Down Expand Up @@ -1166,9 +1167,9 @@ impl<ADC: TriggerType> Conversion<ADC> {
!self.is_active()
}

/// Converts from Conversion<C, E> to Option<C>.
/// Converts from `Conversion<C, E>` to `Option<C>`.
///
/// Converts self into an Option<C>, consuming self, and discarding the adc, if it is stopped.
/// Converts self into an `Option<C>`, consuming self, and discarding the adc, if it is stopped.
#[inline(always)]
pub fn active(self) -> Option<Adc<ADC, Active>> {
match self {
Expand All @@ -1177,9 +1178,9 @@ impl<ADC: TriggerType> Conversion<ADC> {
}
}

/// Converts from Conversion<C, E> to Option<E>.
/// Converts from `Conversion<C, E>` to `Option<E>`.
///
/// Converts self into an Option<E>, consuming self, and discarding the adc, if it is still active.
/// Converts self into an `Option<E>`, consuming self, and discarding the adc, if it is still active.
#[inline(always)]
pub fn stopped(self) -> Option<Adc<ADC, Configured>> {
match self {
Expand Down
6 changes: 3 additions & 3 deletions src/delay.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Delay providers
//!
//! There are currently two delay providers. In general you should prefer to use
//! [Delay](Delay), however if you do not have access to `SYST` you can use
//! [DelayFromCountDownTimer](DelayFromCountDownTimer) with any timer that
//! implements the [CountDown](embedded_hal::timer::CountDown) trait. This can be
//! [Delay], however if you do not have access to `SYST` you can use
//! [DelayFromCountDownTimer] with any timer that
//! implements the [CountDown](embedded_hal_old::timer::CountDown) trait. This can be
//! useful if you're using [RTIC](https://rtic.rs)'s schedule API, which occupies
//! the `SYST` peripheral.
//!
Expand Down
2 changes: 1 addition & 1 deletion src/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! instructions in DMA controller configuration.
//!
//! Adapted from
//! https://github.com/stm32-rs/stm32h7xx-hal/blob/master/src/dma/mod.rs
//! <https://github.com/stm32-rs/stm32h7xx-hal/blob/master/src/dma/mod.rs>
use core::fmt::Debug;

Expand Down
2 changes: 1 addition & 1 deletion src/dma/traits.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Traits for DMA types
//!
//! Adapted from
//! https://github.com/stm32-rs/stm32f4xx-hal/blob/master/src/dma/traits.rs
//! <https://github.com/stm32-rs/stm32f4xx-hal/blob/master/src/dma/traits.rs>
use super::*;

Expand Down
2 changes: 1 addition & 1 deletion src/pwm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ macro_rules! tim_hal {
$(
impl<PINS, CHANNEL, COMP> PwmBuilder<$TIMX, PINS, CHANNEL, FaultDisabled, COMP, $typ> {
/// Configure a break pin that will disable PWM when activated (active level based on polarity argument)
/// Note: not all timers have fault inputs; FaultPins<TIM> is only implemented for valid pins/timers.
/// Note: not all timers have fault inputs; `FaultPins<TIM>` is only implemented for valid pins/timers.
pub fn with_break_pin<P: FaultPins<$TIMX>>(self, _pin: P, polarity: Polarity) -> PwmBuilder<$TIMX, PINS, CHANNEL, FaultEnabled, COMP, $typ> {
PwmBuilder {
_tim: PhantomData,
Expand Down

0 comments on commit 155b53f

Please sign in to comment.