Skip to content

Commit f708a69

Browse files
authored
Merge pull request #233 from Sh3Rm4n/improve-doc
Improve doc
2 parents 2a4382e + bc6b2b8 commit f708a69

File tree

17 files changed

+74
-17
lines changed

17 files changed

+74
-17
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@ jobs:
115115
command: check
116116
args: --features=ld,defmt,${{ matrix.mcu }} --test ${{ matrix.test }}
117117

118+
check-doc:
119+
name: Check Documentation Build
120+
runs-on: ubuntu-latest
121+
steps:
122+
- uses: actions/checkout@v2
123+
- uses: actions-rs/toolchain@v1
124+
with:
125+
toolchain: nightly
126+
target: thumbv7em-none-eabihf
127+
override: true
128+
profile: minimal
129+
- uses: actions-rs/cargo@v1
130+
with:
131+
command: doc
132+
args: --features=stm32f303xc,rt,stm32-usbd,can
133+
118134
clippy:
119135
name: Clippy
120136
runs-on: ubuntu-latest

src/adc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//! Analog to Digital Converter.
1+
//! # Analog to Digital Converter.
22
//!
3-
//! # Examples
3+
//! ## Examples
44
//!
55
//! Check out [examles/adc.rs][].
66
//!

src/delay.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
//! Delays
1+
//! # Delays
2+
//!
3+
//! Implementations for the [`DelayMs`] and [`DelayUs`] traits
4+
//!
5+
//! [DelayMs]: embedded_hal::blocking::delay::DelayMs
6+
//! [DelayUs]: embedded_hal::blocking::delay::DelayUs
27
38
use core::convert::From;
49

src/dma.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
//! Direct memory access (DMA) controller.
1+
//! # Direct memory access (DMA) controller.
22
//!
33
//! Currently DMA is only supported for STM32F303 or STM32F302 MCUs.
44
//!
5+
//! ## Examples
6+
//!
57
//! An example how to use DMA for serial, can be found at [examples/serial_dma.rs]
68
//!
79
//! [examples/serial_dma.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.6.1/examples/serial_dma.rs

src/flash.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Flash memory
1+
//! # Flash memory
2+
//!
3+
//! Abstractions of the internal flash module.
24
35
use crate::pac::{flash, FLASH};
46

src/gpio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! General Purpose Input / Output
1+
//! # General Purpose Input / Output
22
//!
33
//! To use the GPIO pins, you first need to configure the GPIO port (GPIOA, GPIOB, ...) that you
44
//! are interested in. This is done using the [`GpioExt::split`] function.

src/i2c.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Inter-Integrated Circuit (I2C) bus
1+
//! # Inter-Integrated Circuit (I2C) bus
2+
//!
3+
//! ## Examples
24
//!
35
//! A usage example of the i2c peripheral can be found at [examples/i2c_scanner.rs]
46
//!

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
# stm32f3xx-hal
2+
# `stm32f3xx-hal`
33
44
`stm32f3xx-hal` contains a multi device hardware abstraction on top of the
55
peripheral access API for the STMicro [STM32F3][stm] series microcontrollers.
@@ -90,6 +90,7 @@
9090
#![allow(clippy::upper_case_acronyms)]
9191
#![warn(missing_docs)]
9292
#![deny(macro_use_extern_crate)]
93+
#![cfg_attr(nightly, deny(rustdoc::broken_intra_doc_links))]
9394

9495
use cfg_if::cfg_if;
9596

src/prelude.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
//! Prelude
1+
//! # Prelude
2+
//!
3+
//! ```rust
4+
//! // Import common extension traits.
5+
//! //
6+
//! // This includes internal extension crates,
7+
//! // but also reexportet traits from embeded-hal or embedded time.
8+
//! use stm32f3xx-hal::prelude::*;
9+
//! ```
210
311
#[cfg(any(feature = "stm32f302", feature = "stm32f303"))]
412
pub use crate::dma::DmaExt as _stm32f3xx_hal_dma_DmaExt;

src/rcc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Reset and Clock Control
1+
//! # Reset and Clock Control
22
//!
33
//! The most important function this module
44
//! delivers is the clock configuration.

0 commit comments

Comments
 (0)