Skip to content

Commit f4d1570

Browse files
elfenlaidadamgreig
authored andcommitted
make clippy happy
1 parent a64c2ff commit f4d1570

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

cortex-m-rt/src/lib.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! This crates takes care of:
99
//!
1010
//! - The memory layout of the program. In particular, it populates the vector table so the device
11-
//! can boot correctly, and properly dispatch exceptions and interrupts.
11+
//! can boot correctly, and properly dispatch exceptions and interrupts.
1212
//!
1313
//! - Initializing `static` variables before the program entry point.
1414
//!
@@ -221,42 +221,42 @@
221221
//! One will always find the following (unmangled) symbols in `cortex-m-rt` applications:
222222
//!
223223
//! - `Reset`. This is the reset handler. The microcontroller will execute this function upon
224-
//! booting. This function will call the user program entry point (cf. [`#[entry]`][attr-entry])
225-
//! using the `main` symbol so you will also find that symbol in your program.
224+
//! booting. This function will call the user program entry point (cf. [`#[entry]`][attr-entry])
225+
//! using the `main` symbol so you will also find that symbol in your program.
226226
//!
227227
//! - `DefaultHandler`. This is the default handler. If not overridden using `#[exception] fn
228228
//! DefaultHandler(..` this will be an infinite loop.
229229
//!
230230
//! - `HardFault` and `_HardFault`. These function handle the hard fault handling and what they
231-
//! do depends on whether the hard fault is overridden and whether the trampoline is enabled (which it is by default).
231+
//! do depends on whether the hard fault is overridden and whether the trampoline is enabled (which it is by default).
232232
//! - No override: Both are the same function. The function is an infinite loop defined in the cortex-m-rt crate.
233233
//! - Trampoline enabled: `HardFault` is the real hard fault handler defined in assembly. This function is simply a
234-
//! trampoline that jumps into the rust defined `_HardFault` function. This second function jumps to the user-defined
235-
//! handler with the exception frame as parameter. This second jump is usually optimised away with inlining.
234+
//! trampoline that jumps into the rust defined `_HardFault` function. This second function jumps to the user-defined
235+
//! handler with the exception frame as parameter. This second jump is usually optimised away with inlining.
236236
//! - Trampoline disabled: `HardFault` is the user defined function. This means the user function is called directly
237-
//! from the vector table. `_HardFault` still exists, but is an empty function that is purely there for compiler
238-
//! diagnostics.
237+
//! from the vector table. `_HardFault` still exists, but is an empty function that is purely there for compiler
238+
//! diagnostics.
239239
//!
240240
//! - `__STACK_START`. This is the first entry in the `.vector_table` section. This symbol contains
241-
//! the initial value of the stack pointer; this is where the stack will be located -- the stack
242-
//! grows downwards towards smaller addresses.
241+
//! the initial value of the stack pointer; this is where the stack will be located -- the stack
242+
//! grows downwards towards smaller addresses.
243243
//!
244244
//! - `__RESET_VECTOR`. This is the reset vector, a pointer to the `Reset` function. This vector
245-
//! is located in the `.vector_table` section after `__STACK_START`.
245+
//! is located in the `.vector_table` section after `__STACK_START`.
246246
//!
247247
//! - `__EXCEPTIONS`. This is the core exceptions portion of the vector table; it's an array of 14
248-
//! exception vectors, which includes exceptions like `HardFault` and `SysTick`. This array is
249-
//! located after `__RESET_VECTOR` in the `.vector_table` section.
248+
//! exception vectors, which includes exceptions like `HardFault` and `SysTick`. This array is
249+
//! located after `__RESET_VECTOR` in the `.vector_table` section.
250250
//!
251251
//! - `__INTERRUPTS`. This is the device specific interrupt portion of the vector table; its exact
252-
//! size depends on the target device but if the `"device"` feature has not been enabled it will
253-
//! have a size of 32 vectors (on ARMv6-M) or 240 vectors (on ARMv7-M). This array is located after
254-
//! `__EXCEPTIONS` in the `.vector_table` section.
252+
//! size depends on the target device but if the `"device"` feature has not been enabled it will
253+
//! have a size of 32 vectors (on ARMv6-M) or 240 vectors (on ARMv7-M). This array is located after
254+
//! `__EXCEPTIONS` in the `.vector_table` section.
255255
//!
256256
//! - `__pre_init`. This is a function to be run before RAM is initialized. It defaults to an empty
257-
//! function. As this runs before RAM is initialised, it is not sound to use a Rust function for
258-
//! `pre_init`, and instead it should typically be written in assembly using `global_asm` or an
259-
//! external assembly file.
257+
//! function. As this runs before RAM is initialised, it is not sound to use a Rust function for
258+
//! `pre_init`, and instead it should typically be written in assembly using `global_asm` or an
259+
//! external assembly file.
260260
//!
261261
//! If you override any exception handler you'll find it as an unmangled symbol, e.g. `SysTick` or
262262
//! `SVCall`, in the output of `objdump`,

0 commit comments

Comments
 (0)