aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src
diff options
context:
space:
mode:
authorJacob Rosenthal <[email protected]>2021-11-11 22:47:57 -0700
committerJacob Rosenthal <[email protected]>2021-11-11 22:47:57 -0700
commit937f49deadd603b871f16a05518dffdaa56f3ca4 (patch)
treecd7187ab1e90adf6fc0fd2fbd6c9241ccdabd52a /examples/nrf/src
parentea1c62ff610a67fe35aaab16bd5921fd8e1ae16b (diff)
nrf: sequencepwm rename top to max_duty for consistancy
Diffstat (limited to 'examples/nrf/src')
-rw-r--r--examples/nrf/src/bin/pwm_sequence.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/nrf/src/bin/pwm_sequence.rs b/examples/nrf/src/bin/pwm_sequence.rs
index d02b0c9c5..6014c8994 100644
--- a/examples/nrf/src/bin/pwm_sequence.rs
+++ b/examples/nrf/src/bin/pwm_sequence.rs
@@ -91,7 +91,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
91 let mut config = SequenceConfig::default(); 91 let mut config = SequenceConfig::default();
92 config.prescaler = Prescaler::Div1; 92 config.prescaler = Prescaler::Div1;
93 // 1 period is 32767 * 1/16mhz = 0.002047938 = 2.047938ms 93 // 1 period is 32767 * 1/16mhz = 0.002047938 = 2.047938ms
94 config.top = 32767; 94 config.max_duty = 32767;
95 // pwm example is delaying >~3ms before updating duty cycle, our refreshes 95 // pwm example is delaying >~3ms before updating duty cycle, our refreshes
96 // happen exactly at 2.047938ms so we need a delay after each value of >~1ms 96 // happen exactly at 2.047938ms so we need a delay after each value of >~1ms
97 // which for us is ~1-2 periods 97 // which for us is ~1-2 periods