Skip to content

Commit 49534cd

Browse files
committed
stm32: more docs.
1 parent 138318f commit 49534cd

File tree

23 files changed

+55
-6
lines changed

23 files changed

+55
-6
lines changed

embassy-nrf/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,11 @@ unsafe fn uicr_write_masked(address: *mut u32, value: u32, mask: u32) -> WriteRe
354354
WriteResult::Written
355355
}
356356

357-
/// Initialize peripherals with the provided configuration. This should only be called once at startup.
357+
/// Initialize the `embassy-nrf` HAL with the provided configuration.
358+
///
359+
/// This returns the peripheral singletons that can be used for creating drivers.
360+
///
361+
/// This should only be called once at startup, otherwise it panics.
358362
pub fn init(config: config::Config) -> Peripherals {
359363
// Do this first, so that it panics if user is calling `init` a second time
360364
// before doing anything important.

embassy-stm32/src/adc/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//! Analog to Digital (ADC) converter driver.
1+
//! Analog to Digital Converter (ADC)
2+
23
#![macro_use]
34
#![allow(missing_docs)] // TODO
45

embassy-stm32/src/can/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Controller Area Network (CAN)
12
#![macro_use]
23

34
#[cfg_attr(can_bxcan, path = "bxcan.rs")]

embassy-stm32/src/crc/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Cyclic Redundancy Check (CRC)
12
#[cfg_attr(crc_v1, path = "v1.rs")]
23
#[cfg_attr(crc_v2, path = "v2v3.rs")]
34
#[cfg_attr(crc_v3, path = "v2v3.rs")]

embassy-stm32/src/dac/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Provide access to the STM32 digital-to-analog converter (DAC).
1+
//! Digital to Analog Converter (DAC)
22
#![macro_use]
33

44
use core::marker::PhantomData;

embassy-stm32/src/dcmi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Digital Camera Interface (DCMI)
12
use core::future::poll_fn;
23
use core::marker::PhantomData;
34
use core::task::Poll;

embassy-stm32/src/eth/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Ethernet (ETH)
12
#![macro_use]
23

34
#[cfg_attr(any(eth_v1a, eth_v1b, eth_v1c), path = "v1/mod.rs")]

embassy-stm32/src/exti.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! External Interrupts (EXTI)
12
use core::convert::Infallible;
23
use core::future::Future;
34
use core::marker::PhantomData;

embassy-stm32/src/flash/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Flash memory (FLASH)
12
use embedded_storage::nor_flash::{NorFlashError, NorFlashErrorKind};
23

34
#[cfg(flash_f4)]

embassy-stm32/src/fmc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Flexible Memory Controller (FMC) / Flexible Static Memory Controller (FSMC)
12
use core::marker::PhantomData;
23

34
use embassy_hal_internal::into_ref;

0 commit comments

Comments
 (0)