We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf2cd5a commit 34c3adeCopy full SHA for 34c3ade
pio/pio_blink/blink.c
@@ -31,5 +31,5 @@ void blink_pin_forever(PIO pio, uint sm, uint offset, uint pin, uint freq) {
31
pio_sm_set_enabled(pio, sm, true);
32
33
printf("Blinking pin %d at %d Hz\n", pin, freq);
34
- pio->txf[sm] = clock_get_hz(clk_sys) / 2 * freq;
+ pio->txf[sm] = clock_get_hz(clk_sys) / (2 * freq);
35
}
0 commit comments