diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-11-20 15:39:51 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-11-20 15:39:51 +0100 |
commit | a72b2ece0338905391538a78ea7b3df3a9a6f324 (patch) | |
tree | 41aa85e93ff71744331fffa61d0bc6183132c8d4 /nrf528xx/src | |
parent | 32c89c804b1922ab5dd45eade36f27ea8b3fb197 (diff) |
working nrf source tree
Diffstat (limited to 'nrf528xx/src')
-rw-r--r-- | nrf528xx/src/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nrf528xx/src/main.c b/nrf528xx/src/main.c new file mode 100644 index 0000000..649af38 --- /dev/null +++ b/nrf528xx/src/main.c @@ -0,0 +1,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); + } +} |