Skip to content

Commit a394f35

Browse files
committed
Explain example mcpwm-simple
1 parent c53c0aa commit a394f35

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/mcpwm-simple.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
/// # x = 10
1+
/// Simple example showing how MCPWM may be used to generate two synchronized pwm signals with varying duty.
2+
/// The duty on the pin4 will increase from 0% all the way up to 100% and repeat. At the same time the duty
3+
/// on pin 5 will go from 100% down to 0%
4+
///
5+
/// # duty = 10
26
///
37
/// . .
48
/// . .
@@ -17,7 +21,7 @@
1721
/// . .
1822
///
1923
///
20-
/// # x = 50
24+
/// # duty = 50
2125
/// . .
2226
/// . .
2327
/// .---------------. .---------------.
@@ -35,7 +39,7 @@
3539
/// . .
3640
///
3741
///
38-
/// # x = 90
42+
/// # duty = 90
3943
/// . .
4044
/// . .
4145
/// .------------------------. .------------------------.

0 commit comments

Comments
 (0)