Skip to content

Commit 96be570

Browse files
dalpilRahix
authored andcommitted
Replaces references to "portX" with "pins" in examples
1 parent 6d39ec3 commit 96be570

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

mcu/atmega-hal/src/simple_pwm.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ avr_hal_generic::impl_simple_pwm! {
1010
/// ```
1111
/// let mut timer0 = Timer0Pwm::new(dp.TC0, Prescaler::Prescale64);
1212
///
13-
/// let mut d5 = portd.d5.into_output().into_pwm(&mut timer0);
14-
/// let mut d6 = portd.d6.into_output().into_pwm(&mut timer0);
13+
/// let mut d5 = pins.d5.into_output().into_pwm(&mut timer0);
14+
/// let mut d6 = pins.d6.into_output().into_pwm(&mut timer0);
1515
///
1616
/// d5.set_duty(128);
1717
/// d5.enable();
@@ -58,8 +58,8 @@ avr_hal_generic::impl_simple_pwm! {
5858
/// ```
5959
/// let mut timer1 = Timer1Pwm::new(dp.TC1, Prescaler::Prescale64);
6060
///
61-
/// let mut d9 = portb.d9.into_output().into_pwm(&mut timer1);
62-
/// let mut d10 = portb.d10.into_output().into_pwm(&mut timer1);
61+
/// let mut d9 = pins.d9.into_output().into_pwm(&mut timer1);
62+
/// let mut d10 = pins.d10.into_output().into_pwm(&mut timer1);
6363
///
6464
/// d9.set_duty(128);
6565
/// d9.enable();
@@ -110,8 +110,8 @@ avr_hal_generic::impl_simple_pwm! {
110110
/// ```
111111
/// let mut timer2 = Timer2Pwm::new(dp.TC2, Prescaler::Prescale64);
112112
///
113-
/// let mut d11 = portb.d11.into_output().into_pwm(&mut timer2);
114-
/// let mut d3 = portd.d3.into_output().into_pwm(&mut timer2);
113+
/// let mut d11 = pins.d11.into_output().into_pwm(&mut timer2);
114+
/// let mut d3 = pins.d3.into_output().into_pwm(&mut timer2);
115115
///
116116
/// d11.set_duty(128);
117117
/// d11.enable();
@@ -241,8 +241,8 @@ avr_hal_generic::impl_simple_pwm! {
241241
/// ```
242242
/// let mut timer0 = Timer0Pwm::new(dp.TC0, Prescaler::Prescale64);
243243
///
244-
/// let mut d13 = portb.d13.into_output().into_pwm(&mut timer0);
245-
/// let mut d4 = portg.d4.into_output().into_pwm(&mut timer0);
244+
/// let mut d13 = pins.d13.into_output().into_pwm(&mut timer0);
245+
/// let mut d4 = pins.d4.into_output().into_pwm(&mut timer0);
246246
///
247247
/// d13.set_duty(128);
248248
/// d13.enable();
@@ -289,9 +289,9 @@ avr_hal_generic::impl_simple_pwm! {
289289
/// ```
290290
/// let mut timer1 = Timer1Pwm::new(dp.TC1, Prescaler::Prescale64);
291291
///
292-
/// let mut d11 = portb.d11.into_output().into_pwm(&mut timer1);
293-
/// let mut d12 = portb.d12.into_output().into_pwm(&mut timer1);
294-
/// let mut d13 = portb.d13.into_output().into_pwm(&mut timer1);
292+
/// let mut d11 = pins.d11.into_output().into_pwm(&mut timer1);
293+
/// let mut d12 = pins.d12.into_output().into_pwm(&mut timer1);
294+
/// let mut d13 = pins.d13.into_output().into_pwm(&mut timer1);
295295
///
296296
/// d11.set_duty(128);
297297
/// d11.enable();
@@ -347,8 +347,8 @@ avr_hal_generic::impl_simple_pwm! {
347347
/// ```
348348
/// let mut timer2 = Timer2Pwm::new(dp.TC2, Prescaler::Prescale64);
349349
///
350-
/// let mut d10 = portb.into_output().into_pwm(&mut timer2);
351-
/// let mut d9 = porth.into_output().into_pwm(&mut timer2);
350+
/// let mut d10 = pins.d10.into_output().into_pwm(&mut timer2);
351+
/// let mut d9 = pins.d9.into_output().into_pwm(&mut timer2);
352352
///
353353
/// d10.set_duty(128);
354354
/// d10.enable();
@@ -400,9 +400,9 @@ avr_hal_generic::impl_simple_pwm! {
400400
/// ```
401401
/// let mut timer3 = Timer3Pwm::new(dp.TC3, Prescaler::Prescale64);
402402
///
403-
/// let mut d5 = porte.d5.into_output().into_pwm(&mut timer3);
404-
/// let mut d2 = porte.d2.into_output().into_pwm(&mut timer3);
405-
/// let mut d3 = porte.d3.into_output().into_pwm(&mut timer3);
403+
/// let mut d5 = pins.d5.into_output().into_pwm(&mut timer3);
404+
/// let mut d2 = pins.d2.into_output().into_pwm(&mut timer3);
405+
/// let mut d3 = pins.d3.into_output().into_pwm(&mut timer3);
406406
///
407407
/// d5.set_duty(128);
408408
/// d5.enable();
@@ -463,9 +463,9 @@ avr_hal_generic::impl_simple_pwm! {
463463
/// ```
464464
/// let mut timer4 = Timer4Pwm::new(dp.TC4, Prescaler::Prescale64);
465465
///
466-
/// let mut d6 = porth.d6.into_output().into_pwm(&mut timer4);
467-
/// let mut d7 = porth.d7.into_output().into_pwm(&mut timer4);
468-
/// let mut d8 = porth.d8.into_output().into_pwm(&mut timer4);
466+
/// let mut d6 = pins.d6.into_output().into_pwm(&mut timer4);
467+
/// let mut d7 = pins.d7.into_output().into_pwm(&mut timer4);
468+
/// let mut d8 = pins.d8.into_output().into_pwm(&mut timer4);
469469
///
470470
/// d6.set_duty(128);
471471
/// d6.enable();
@@ -526,9 +526,9 @@ avr_hal_generic::impl_simple_pwm! {
526526
/// ```
527527
/// let mut timer5 = Timer5Pwm::new(dp.TC5, Prescaler::Prescale64);
528528
///
529-
/// let mut d46 = portl.d46.into_output().into_pwm(&mut timer5);
530-
/// let mut d45 = portl.d45.into_output().into_pwm(&mut timer5);
531-
/// let mut d44 = portl.d44.into_output().into_pwm(&mut timer5);
529+
/// let mut d46 = pins.d46.into_output().into_pwm(&mut timer5);
530+
/// let mut d45 = pins.d45.into_output().into_pwm(&mut timer5);
531+
/// let mut d44 = pins.d44.into_output().into_pwm(&mut timer5);
532532
///
533533
/// d46.set_duty(128);
534534
/// d46.enable();

mcu/attiny-hal/src/simple_pwm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ avr_hal_generic::impl_simple_pwm! {
1010
/// ```
1111
/// let mut timer0 = Timer0Pwm::new(dp.TC0, Prescaler::Prescale64);
1212
///
13-
/// let mut d0 = portd.d0.into_output().into_pwm(&mut timer0);
14-
/// let mut d1 = portd.d1.into_output().into_pwm(&mut timer0);
13+
/// let mut d0 = pins.d0.into_output().into_pwm(&mut timer0);
14+
/// let mut d1 = pins.d1.into_output().into_pwm(&mut timer0);
1515
///
1616
/// d0.set_duty(128);
1717
/// d0.enable();
@@ -58,7 +58,7 @@ avr_hal_generic::impl_simple_pwm! {
5858
/// ```
5959
/// let mut timer1 = Timer1Pwm::new(dp.TC1, Prescaler::Prescale64);
6060
///
61-
/// let mut d4 = portd.d4.into_output().into_pwm(&mut timer1);
61+
/// let mut d4 = pins.d4.into_output().into_pwm(&mut timer1);
6262
///
6363
/// d4.set_duty(128);
6464
/// d4.enable();

0 commit comments

Comments
 (0)