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