blob: 649af38a7a4fea534b01e3f5007373e02890bd8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <zephyr/zephyr.h>
#include <zephyr/drivers/gpio.h>
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
void main() {
gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
while (1) {
gpio_pin_toggle_dt(&led);
k_msleep(1000);
}
}
|