diff options
| author | Jacob Rosenthal <[email protected]> | 2021-11-11 22:47:57 -0700 |
|---|---|---|
| committer | Jacob Rosenthal <[email protected]> | 2021-11-11 22:47:57 -0700 |
| commit | 937f49deadd603b871f16a05518dffdaa56f3ca4 (patch) | |
| tree | cd7187ab1e90adf6fc0fd2fbd6c9241ccdabd52a /examples | |
| parent | ea1c62ff610a67fe35aaab16bd5921fd8e1ae16b (diff) | |
nrf: sequencepwm rename top to max_duty for consistancy
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf/src/bin/pwm_sequence.rs | 2 |
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 |
