|
3 | 3 | //! [CMSIS-SVD]: http://www.keil.com/pack/doc/CMSIS/SVD/html/index.html
|
4 | 4 | //!
|
5 | 5 | //! A SVD file is an XML file that describes the hardware features of a
|
6 |
| -//! microcontroller. In particular, it list all the peripherals available to the |
7 |
| -//! device, where the registers associated to each device are located in memory |
| 6 | +//! microcontroller. In particular, it lists all the peripherals available to the |
| 7 | +//! device, where the registers associated to each device are located in memory, |
8 | 8 | //! and what's the function of each register.
|
9 | 9 | //!
|
10 | 10 | //! `svd2rust` is a command line tool that transforms SVD files into crates that
|
|
28 | 28 | //!
|
29 | 29 | //! ## target = cortex-m
|
30 | 30 | //!
|
31 |
| -//! When targeting the Cortex-M architecture `svd2rust` will generate three files in the current |
| 31 | +//! When targeting the Cortex-M architecture, `svd2rust` will generate three files in the current |
32 | 32 | //! directory:
|
33 | 33 | //!
|
34 | 34 | //! - `build.rs`, build script that places `device.x` somewhere the linker can find.
|
|
174 | 174 | //! ```
|
175 | 175 | //!
|
176 | 176 | //! The singleton property can be *unsafely* bypassed using the `ptr` static method which is
|
177 |
| -//! available on all the peripheral types. This method is a useful for implementing safe higher |
| 177 | +//! available on all the peripheral types. This method is useful for implementing safe higher |
178 | 178 | //! level abstractions.
|
179 | 179 | //!
|
180 | 180 | //! ```ignore
|
|
240 | 240 | //! # `read` / `modify` / `write` API
|
241 | 241 | //!
|
242 | 242 | //! Each register in the register block, e.g. the `cr1` field in the `I2C` struct, exposes a
|
243 |
| -//! combination of the `read`, `modify` and `write` methods. Which methods exposes each register |
| 243 | +//! combination of the `read`, `modify`, and `write` methods. Which method exposes each register |
244 | 244 | //! depends on whether the register is read-only, read-write or write-only:
|
245 | 245 | //!
|
246 | 246 | //! - read-only registers only expose the `read` method.
|
247 | 247 | //! - write-only registers only expose the `write` method.
|
248 |
| -//! - read-write registers expose all the methods: `read`, `modify` and |
| 248 | +//! - read-write registers expose all the methods: `read`, `modify`, and |
249 | 249 | //! `write`.
|
250 | 250 | //!
|
251 |
| -//! This is signature of each of these methods: |
| 251 | +//! Below shows signatures of each of these methods: |
252 | 252 | //!
|
253 | 253 | //! (using `I2C`'s `CR2` register as an example)
|
254 | 254 | //!
|
|
467 | 467 | //!
|
468 | 468 | //! ## the "rt" feature
|
469 | 469 | //!
|
470 |
| -//! If the "rt" Cargo feature of the svd2rust generated crate is enabled the crate will populate the |
| 470 | +//! If the "rt" Cargo feature of the svd2rust generated crate is enabled, the crate will populate the |
471 | 471 | //! part of the vector table that contains the interrupt vectors and provide an
|
472 | 472 | //! [`interrupt!`](macro.interrupt.html) macro (non Cortex-M/MSP430 targets) or [`interrupt`] attribute
|
473 | 473 | //! (Cortex-M or [MSP430](https://docs.rs/msp430-rt-macros/0.1/msp430_rt_macros/attr.interrupt.html))
|
|
0 commit comments