Skip to content

Commit 86ca3fe

Browse files
hathachkilograham
authored andcommitted
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
1 parent e77a4a8 commit 86ca3fe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

blink/blink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "pico/stdlib.h"
88

99
int main() {
10-
const uint LED_PIN = 25;
10+
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
1111
gpio_init(LED_PIN);
1212
gpio_set_dir(LED_PIN, GPIO_OUT);
1313
while (true) {

picoboard/blinky/blinky.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "pico/stdlib.h"
99
#include "hardware/gpio.h"
1010

11-
const uint LED_PIN = 25;
11+
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
1212
const uint DOT_PERIOD_MS = 100;
1313

1414
const char *morse_letters[] = {

pio/pwm/pwm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main() {
3333
uint offset = pio_add_program(pio, &pwm_program);
3434
printf("Loaded program at %d\n", offset);
3535

36-
pwm_program_init(pio, sm, offset, 25);
36+
pwm_program_init(pio, sm, offset, PICO_DEFAULT_LED_PIN);
3737
pio_pwm_set_period(pio, sm, (1u << 16) - 1);
3838

3939
int level = 0;

0 commit comments

Comments
 (0)