Skip to content

Commit 7f75c61

Browse files
authored
Merge pull request #417 from ivario123/cargo_doc_fix
fix doc comments, remove warnings when running cargo doc
2 parents b05db68 + 71415a1 commit 7f75c61

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

nrf-hal-common/src/timer.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub struct Periodic;
5454
/// Right now, this is a very basic interface. The timer will always be
5555
/// hardcoded to a frequency of 1 MHz and 32 bits accuracy.
5656
///
57-
/// CC[0] is used for the current/most-recent delay period and CC[1] is used
57+
/// CC\[0\] is used for the current/most-recent delay period and CC\[1\] is used
5858
/// to grab the current value of the counter at a given instant.
5959
pub struct Timer<T, U = OneShot>(T, PhantomData<U>);
6060

@@ -107,7 +107,7 @@ where
107107
self.0
108108
}
109109

110-
/// Return the current value of the counter, by capturing to CC[1].
110+
/// Return the current value of the counter, by capturing to CC\[1\].
111111
pub fn read(&self) -> u32 {
112112
self.0.read_counter()
113113
}
@@ -181,61 +181,61 @@ where
181181
&self.0.as_timer0().tasks_clear
182182
}
183183

184-
/// Returns reference to the CC[0] `CAPTURE` task endpoint for PPI.
185-
/// Captures timer value to the CC[0] register.
184+
/// Returns reference to the CC\[0\] `CAPTURE` task endpoint for PPI.
185+
/// Captures timer value to the CC\[0\] register.
186186
#[inline(always)]
187187
pub fn task_capture_cc0(&self) -> &TASKS_CAPTURE {
188188
&self.0.as_timer0().tasks_capture[0]
189189
}
190190

191-
/// Returns reference to the CC[1] `CAPTURE` task endpoint for PPI.
192-
/// Captures timer value to the CC[1] register.
191+
/// Returns reference to the CC\[1\] `CAPTURE` task endpoint for PPI.
192+
/// Captures timer value to the CC\[1\] register.
193193
#[inline(always)]
194194
pub fn task_capture_cc1(&self) -> &TASKS_CAPTURE {
195195
&self.0.as_timer0().tasks_capture[1]
196196
}
197197

198-
/// Returns reference to the CC[2] `CAPTURE` task endpoint for PPI.
199-
/// Captures timer value to the CC[2] register.
198+
/// Returns reference to the CC\[2\] `CAPTURE` task endpoint for PPI.
199+
/// Captures timer value to the CC\[2\] register.
200200
#[inline(always)]
201201
pub fn task_capture_cc2(&self) -> &TASKS_CAPTURE {
202202
&self.0.as_timer0().tasks_capture[2]
203203
}
204204

205-
/// Returns reference to the CC[3] `CAPTURE` task endpoint for PPI.
206-
/// Captures timer value to the CC[3] register.
205+
/// Returns reference to the CC\[3\] `CAPTURE` task endpoint for PPI.
206+
/// Captures timer value to the CC\[3\] register.
207207
#[inline(always)]
208208
pub fn task_capture_cc3(&self) -> &TASKS_CAPTURE {
209209
&self.0.as_timer0().tasks_capture[3]
210210
}
211211

212-
/// Returns reference to the CC[0] `COMPARE` event endpoint for PPI.
212+
/// Returns reference to the CC\[0\] `COMPARE` event endpoint for PPI.
213213
/// Generated when the counter is incremented and then matches the value
214-
/// specified in the CC[0] register.
214+
/// specified in the CC\[0\] register.
215215
#[inline(always)]
216216
pub fn event_compare_cc0(&self) -> &EVENTS_COMPARE {
217217
&self.0.as_timer0().events_compare[0]
218218
}
219219

220-
/// Returns reference to the CC[1] `COMPARE` event endpoint for PPI.
220+
/// Returns reference to the CC\[1\] `COMPARE` event endpoint for PPI.
221221
/// Generated when the counter is incremented and then matches the value
222-
/// specified in the CC[1] register.
222+
/// specified in the CC\[1\] register.
223223
#[inline(always)]
224224
pub fn event_compare_cc1(&self) -> &EVENTS_COMPARE {
225225
&self.0.as_timer0().events_compare[1]
226226
}
227227

228-
/// Returns reference to the CC[2] `COMPARE` event endpoint for PPI.
228+
/// Returns reference to the CC\[2\] `COMPARE` event endpoint for PPI.
229229
/// Generated when the counter is incremented and then matches the value
230-
/// specified in the CC[2] register.
230+
/// specified in the CC\[2\] register.
231231
#[inline(always)]
232232
pub fn event_compare_cc2(&self) -> &EVENTS_COMPARE {
233233
&self.0.as_timer0().events_compare[2]
234234
}
235235

236-
/// Returns reference to the CC[3] `COMPARE` event endpoint for PPI.
236+
/// Returns reference to the CC\[3\] `COMPARE` event endpoint for PPI.
237237
/// Generated when the counter is incremented and then matches the value
238-
/// specified in the CC[3] register.
238+
/// specified in the CC\[3\] register.
239239
#[inline(always)]
240240
pub fn event_compare_cc3(&self) -> &EVENTS_COMPARE {
241241
&self.0.as_timer0().events_compare[3]
@@ -505,7 +505,7 @@ impl Instance for TIMER4 {
505505
}
506506
}
507507

508-
/// Adds task- and event PPI endpoint getters for CC[4] and CC[5] on supported instances.
508+
/// Adds task- and event PPI endpoint getters for CC\[4\] and CC\[5\] on supported instances.
509509
#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))]
510510
pub trait ExtendedCCTimer {
511511
fn task_capture_cc4(&self) -> &TasksCapture3;
@@ -516,25 +516,25 @@ pub trait ExtendedCCTimer {
516516

517517
#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))]
518518
impl ExtendedCCTimer for Timer<TIMER3> {
519-
/// Returns reference to the CC[4] `CAPTURE` task endpoint for PPI.
519+
/// Returns reference to the CC\[4\] `CAPTURE` task endpoint for PPI.
520520
#[inline(always)]
521521
fn task_capture_cc4(&self) -> &TasksCapture3 {
522522
&self.0.tasks_capture[4]
523523
}
524524

525-
/// Returns reference to the CC[5] `CAPTURE` task endpoint for PPI.
525+
/// Returns reference to the CC\[5\] `CAPTURE` task endpoint for PPI.
526526
#[inline(always)]
527527
fn task_capture_cc5(&self) -> &TasksCapture3 {
528528
&self.0.tasks_capture[5]
529529
}
530530

531-
/// Returns reference to the CC[4] `COMPARE` event endpoint for PPI.
531+
/// Returns reference to the CC\[4\] `COMPARE` event endpoint for PPI.
532532
#[inline(always)]
533533
fn event_compare_cc4(&self) -> &EventsCompare3 {
534534
&self.0.events_compare[4]
535535
}
536536

537-
/// Returns reference to the CC[5] `COMPARE` event endpoint for PPI.
537+
/// Returns reference to the CC\[5\] `COMPARE` event endpoint for PPI.
538538
#[inline(always)]
539539
fn event_compare_cc5(&self) -> &EventsCompare3 {
540540
&self.0.events_compare[5]
@@ -543,25 +543,25 @@ impl ExtendedCCTimer for Timer<TIMER3> {
543543

544544
#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))]
545545
impl ExtendedCCTimer for Timer<TIMER4> {
546-
/// Returns reference to the CC[4] `CAPTURE` task endpoint for PPI.
546+
/// Returns reference to the CC\[4\] `CAPTURE` task endpoint for PPI.
547547
#[inline(always)]
548548
fn task_capture_cc4(&self) -> &TasksCapture3 {
549549
&self.0.tasks_capture[4]
550550
}
551551

552-
/// Returns reference to the CC[5] `CAPTURE` task endpoint for PPI.
552+
/// Returns reference to the CC\[5\] `CAPTURE` task endpoint for PPI.
553553
#[inline(always)]
554554
fn task_capture_cc5(&self) -> &TasksCapture3 {
555555
&self.0.tasks_capture[5]
556556
}
557557

558-
/// Returns reference to the CC[4] `COMPARE` event endpoint for PPI.
558+
/// Returns reference to the CC\[4\] `COMPARE` event endpoint for PPI.
559559
#[inline(always)]
560560
fn event_compare_cc4(&self) -> &EventsCompare3 {
561561
&self.0.events_compare[4]
562562
}
563563

564-
/// Returns reference to the CC[5] `COMPARE` event endpoint for PPI.
564+
/// Returns reference to the CC\[5\] `COMPARE` event endpoint for PPI.
565565
#[inline(always)]
566566
fn event_compare_cc5(&self) -> &EventsCompare3 {
567567
&self.0.events_compare[5]

0 commit comments

Comments
 (0)