From a28d39af910bf5f7b750fa1b6f77fb219eb88769 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 20 Nov 2022 15:50:09 +0100 Subject: move main out of src folder --- nrf528xx/CMakeLists.txt | 2 +- nrf528xx/main.c | 13 +++++++++++++ nrf528xx/src/main.c | 13 ------------- 3 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 nrf528xx/main.c delete mode 100644 nrf528xx/src/main.c diff --git a/nrf528xx/CMakeLists.txt b/nrf528xx/CMakeLists.txt index 5265fc3..d363edc 100644 --- a/nrf528xx/CMakeLists.txt +++ b/nrf528xx/CMakeLists.txt @@ -3,5 +3,5 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(NONE) -target_sources(app PRIVATE src/main.c) +target_sources(app PRIVATE main.c) 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 +#include + +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); + } +} diff --git a/nrf528xx/src/main.c b/nrf528xx/src/main.c deleted file mode 100644 index 649af38..0000000 --- a/nrf528xx/src/main.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -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); - } -} -- cgit v1.2.3