aboutsummaryrefslogtreecommitdiff
path: root/nrf528xx/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'nrf528xx/main.c')
-rw-r--r--nrf528xx/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/nrf528xx/main.c b/nrf528xx/main.c
new file mode 100644
index 0000000..22777f9
--- /dev/null
+++ b/nrf528xx/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(500);
+ }
+}