Skip to content

Commit 32bb2f2

Browse files
authored
Fix spelling (#15)
1 parent f2e0a44 commit 32bb2f2

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# stm32-hrtim
22

3-
This crate implements a driver for the HRTIM peripheral found in select devices from F3, G4 and H7 series of STM32 microcontrollers. The HRTIM peripheral is a high resolution timer that allows precise control even at higher frequencies.
3+
This crate implements a driver for the HRTIM peripheral found in select devices from F3, G4 and H7 series of STM32 micro controllers. The HRTIM peripheral is a high resolution timer that allows precise control even at higher frequencies.
44

55
The HRTIM is primarily intended to drive power conversion systems such as switch mode power
66
supplies or lighting systems, but can be of general purpose usage, whenever a very fine
7-
timing resolution is expected. It is very flexible allowing complicated waveforms and suport connections to various other peripherals like DACs, ADCs, comparators, other timers, DMA etc.
7+
timing resolution is expected. It is very flexible allowing complicated waveforms and support connections to various other peripherals like DACs, ADCs, comparators, other timers, DMA etc.
88

99
### Status
1010

src/capture.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub trait HrCapture {
7070
}
7171
}
7272

73-
/// Get number of ticks relative to beginning of upcounting
73+
/// Get number of ticks relative to beginning of up counting
7474
///
7575
/// where captures during down counting count as negative (before the upcount)
7676
///
@@ -87,7 +87,7 @@ pub trait HrCapture {
8787
/// Negative result | positive result
8888
/// ```
8989
///
90-
/// NOTE: This function will use [`Self::is_pending`] to chech if there is a value available and
90+
/// NOTE: This function will use [`Self::is_pending`] to check if there is a value available and
9191
/// [`Self::clear_interrupt`] to clear it.
9292
fn get_signed(&mut self, period: u16) -> Option<i32> {
9393
if self.is_pending() {
@@ -101,7 +101,7 @@ pub trait HrCapture {
101101

102102
fn get_last(&self) -> (u16, CountingDirection);
103103

104-
/// Get number of ticks relative to beginning of upcounting
104+
/// Get number of ticks relative to beginning of up counting
105105
///
106106
/// where captures during down counting count as negative (before the upcount)
107107
///
@@ -190,15 +190,15 @@ impl<TIM: InstanceX, CH: ChExt, PSCL> HrCapt<TIM, PSCL, CH, NoDma> {
190190

191191
// TODO: It would be sufficient to instead of hr_control only require exclusive access to the owning timer
192192
// however that would be hard to do since typically the capture device is a field of that same timer.
193-
// Would it make more sense to have this method direcly on HrTim instead?
193+
// Would it make more sense to have this method directly on HrTim instead?
194194
pub fn enable_interrupt(&mut self, enable: bool, _hr_control: &mut super::HrPwmControl) {
195195
let tim = unsafe { &*TIM::ptr() };
196196

197197
tim.dier().modify(|_r, w| w.cptie(CH::CH as _).bit(enable));
198198
}
199199

200200
pub fn enable_dma(self, _ch: timer::DmaChannel<TIM>) -> HrCapt<TIM, PSCL, CH, Dma> {
201-
// SAFETY: We own the only insance of this timers dma channel, no one else can do this
201+
// SAFETY: We own the only instance of this timers dma channel, no one else can do this
202202
let tim = unsafe { &*TIM::ptr() };
203203
tim.dier().modify(|_r, w| w.cptde(CH::CH as _).set_bit());
204204
HrCapt { _x: PhantomData }

src/control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<'a> Foo<'a> {
293293
}
294294

295295
impl HrPwmCtrl {
296-
/// Start/stop mutliple timers at the exact same time
296+
/// Start/stop multiple timers at the exact same time
297297
///
298298
/// ```
299299
/// let mut timer_a = ...;

src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub enum HrTimerMode {
110110

111111
#[derive(Copy, Clone, PartialEq, Debug)]
112112
pub enum HrCountingDirection {
113-
/// Asymetrical up counting mode
113+
/// Asymmetrical up counting mode
114114
///
115115
///
116116
/// * *
@@ -155,7 +155,7 @@ pub enum HrCountingDirection {
155155
///
156156
/// NOTE: This is incompatible with
157157
/// * Auto-delay
158-
/// * Balanded Idle
158+
/// * Balanced Idle
159159
/// * Triggered-half mode
160160
///
161161
/// There is also differences in (including but not limited to) the following areas:
@@ -172,7 +172,7 @@ pub enum InterleavedMode {
172172
/// Dual interleaved or Half mode
173173
///
174174
/// Automatically force
175-
/// * Cr1 to PERIOD / 2 (not visable through `get_duty`).
175+
/// * Cr1 to PERIOD / 2 (not visible through `get_duty`).
176176
///
177177
/// Automatically updates when changing period
178178
///
@@ -186,7 +186,7 @@ pub enum InterleavedMode {
186186
/// * Cr1 to 1 * PERIOD / 3 and
187187
/// * Cr2 to 2 * PERIOD / 3
188188
///
189-
/// (not visable through `get_duty`). Automatically updates when changing period.
189+
/// (not visible through `get_duty`). Automatically updates when changing period.
190190
///
191191
/// NOTE: Must not be used simultaneously with other modes
192192
/// using CMP2 (dual channel dac trigger and triggered-half modes).
@@ -200,7 +200,7 @@ pub enum InterleavedMode {
200200
/// * Cr2 to 2 * PERIOD / 4 and
201201
/// * Cr3 to 3 * PERIOD / 4
202202
///
203-
/// (not visable through `get_duty`). Automatically updates when changing period.
203+
/// (not visible through `get_duty`). Automatically updates when changing period.
204204
///
205205
/// NOTE: Must not be used simultaneously with other modes
206206
/// using CMP2 (dual channel dac trigger and triggered-half modes).
@@ -272,7 +272,7 @@ impl DacResetTrigger for DacResetOnOut1Set {
272272
///
273273
/// The compare 2 has a particular operating mode when using `OnCmp2`. The active
274274
/// comparison value is automatically updated as soon as a compare match
275-
/// has occured, so that the trigger can be repeated periodically with a period
275+
/// has occurred, so that the trigger can be repeated periodically with a period
276276
/// equal to the CMP2 value.
277277
///
278278
/// NOTE:
@@ -359,12 +359,12 @@ pub enum PreloadSource {
359359
/// Preloaded registers are updated by master timer update
360360
OnMasterTimerUpdate,
361361

362-
/// Prealoaded registers are updaten when the counter rolls over and the repetition counter is 0
362+
/// Prealoaded registers are updated when the counter rolls over and the repetition counter is 0
363363
OnRepetitionUpdate,
364364
}
365365

366366
pub enum MasterPreloadSource {
367-
/// Prealoaded registers are updaten when the master counter rolls over and the master repetition counter is 0
367+
/// Preloaded registers are updated when the master counter rolls over and the master repetition counter is 0
368368
OnMasterRepetitionUpdate,
369369
}
370370

@@ -477,7 +477,7 @@ macro_rules! hrtim_finalize_body {
477477
} = deadtime;
478478

479479
// SAFETY: DeadtimeConfig makes sure rising and falling values are valid
480-
// and DeadtimePrescaler has its own garantuee
480+
// and DeadtimePrescaler has its own guarantee
481481
tim.dtr().modify(|_r, w| w
482482
.dtprsc().bits(prescaler as u8)
483483
.dtr().bits(deadtime_rising_value)

src/timer_eev_cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct EevCfgs<TIM> {
1414

1515
// TODO: Expose these
1616
// TODO: Note there are some peculiarities here with fast mode
17-
// One way to prevent missuse would be to require a borrowed ExternalEventSource<IS_FAST> when setting
17+
// One way to prevent misuse would be to require a borrowed ExternalEventSource<IS_FAST> when setting
1818
// filter/latching as well as the event_counter related settings below.
1919
#[cfg(feature = "hrtim_v2")]
2020
pub(crate) event_counter_enable_bit: bool,

0 commit comments

Comments
 (0)