aboutsummaryrefslogtreecommitdiff
path: root/nrf528xx
diff options
context:
space:
mode:
Diffstat (limited to 'nrf528xx')
-rw-r--r--nrf528xx/main.c16
-rw-r--r--nrf528xx/makefile10
-rw-r--r--nrf528xx/readme.md2
3 files changed, 20 insertions, 8 deletions
diff --git a/nrf528xx/main.c b/nrf528xx/main.c
index 22777f9..c85a6c1 100644
--- a/nrf528xx/main.c
+++ b/nrf528xx/main.c
@@ -1,13 +1,13 @@
-#include <zephyr/zephyr.h>
#include <zephyr/drivers/gpio.h>
+#include <zephyr/zephyr.h>
-static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
+static const struct gpio_dt_spec CD_LED = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
-void main() {
- gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
+void main() { // NOLINT
+ gpio_pin_configure_dt(&CD_LED, GPIO_OUTPUT_ACTIVE);
- while (1) {
- gpio_pin_toggle_dt(&led);
- k_msleep(500);
- }
+ while (1) {
+ gpio_pin_toggle_dt(&CD_LED);
+ k_msleep(500);
+ }
}
diff --git a/nrf528xx/makefile b/nrf528xx/makefile
new file mode 100644
index 0000000..ab7d624
--- /dev/null
+++ b/nrf528xx/makefile
@@ -0,0 +1,10 @@
+.PHONY: format
+
+SRCS :=
+
+SRCS += $(wildcard *.c)
+SRCS += $(wildcard *.h)
+
+format:
+ clang-format -i $(SRCS)
+ clang-tidy --fix-errors $(SRCS)
diff --git a/nrf528xx/readme.md b/nrf528xx/readme.md
index 3cd3f02..dda17b9 100644
--- a/nrf528xx/readme.md
+++ b/nrf528xx/readme.md
@@ -1,5 +1,7 @@
# nrf528xx subdirectory
+> the makefile in this folder isn't used for building but for auxiliary rules
+
## building
```bash