change blink to use PICO_DEFAULT_LED_PIN to support other boards (#57)

* change blink to use PICO_DEFAULT_LED_PIN to support other boards

* also update pio/pwm and picoboard/blinky system/hello_double_tap
This commit is contained in:
Ha Thach
2021-02-22 22:08:12 +07:00
committed by GitHub
parent 6a53ff302b
commit 1be0e7fc28
3 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ int main() {
uint offset = pio_add_program(pio, &pwm_program);
printf("Loaded program at %d\n", offset);
pwm_program_init(pio, sm, offset, 25);
pwm_program_init(pio, sm, offset, PICO_DEFAULT_LED_PIN);
pio_pwm_set_period(pio, sm, (1u << 16) - 1);
int level = 0;