From 1f89707cd317f47777ae44c834ed8b015045be5b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 6 Oct 2022 01:19:17 +0200 Subject: rename sdk-blink example to just blink --- blink/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ blink/Makefile | 30 ++++++++++++++++++++++++++++++ blink/blink.c | 23 +++++++++++++++++++++++ sdk-blink/CMakeLists.txt | 37 ------------------------------------- sdk-blink/Makefile | 30 ------------------------------ sdk-blink/blink.c | 23 ----------------------- 6 files changed, 90 insertions(+), 90 deletions(-) create mode 100644 blink/CMakeLists.txt create mode 100644 blink/Makefile create mode 100644 blink/blink.c delete mode 100644 sdk-blink/CMakeLists.txt delete mode 100644 sdk-blink/Makefile delete mode 100644 sdk-blink/blink.c diff --git a/blink/CMakeLists.txt b/blink/CMakeLists.txt new file mode 100644 index 0000000..08b5e6e --- /dev/null +++ b/blink/CMakeLists.txt @@ -0,0 +1,37 @@ +## +## spreadspace rppico utils +## +## +## Copyright (C) 2022 Christian Pointner +## +## This file is part of spreadspace rppico utils. +## +## spreadspace rppico utils is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## any later version. +## +## spreadspace rppico utils is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with spreadspace rppico utils. If not, see . +## + +cmake_minimum_required(VERSION 3.12) +include(../sdk.cmake) + +project(blink C CXX ASM) + +pico_sdk_init() + +add_compile_options(-Wall) + +add_executable(blink + blink.c + ) + +target_link_libraries(blink pico_stdlib) +pico_add_extra_outputs(blink) diff --git a/blink/Makefile b/blink/Makefile new file mode 100644 index 0000000..110de49 --- /dev/null +++ b/blink/Makefile @@ -0,0 +1,30 @@ +## +## spreadspace rppico utils +## +## +## Copyright (C) 2022 Christian Pointner +## +## This file is part of spreadspace rppico utils. +## +## spreadspace rppico utils is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## any later version. +## +## spreadspace rppico utils is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with spreadspace rppico utils. If not, see . +## + +PROJECT := blink +PICO_PLATFORM := rp2040 +PICO_BOARD := pico +CMAKE_BUILD_TYPE := Release + +include ../defines.mk +include ../sdk.mk +include ../debug.mk diff --git a/blink/blink.c b/blink/blink.c new file mode 100644 index 0000000..d478d78 --- /dev/null +++ b/blink/blink.c @@ -0,0 +1,23 @@ +/** + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/stdlib.h" + +int main() { +#ifndef PICO_DEFAULT_LED_PIN +#warning blink example requires a board with a regular LED +#else + const uint LED_PIN = PICO_DEFAULT_LED_PIN; + gpio_init(LED_PIN); + gpio_set_dir(LED_PIN, GPIO_OUT); + while (true) { + gpio_put(LED_PIN, 1); + sleep_ms(250); + gpio_put(LED_PIN, 0); + sleep_ms(250); + } +#endif +} diff --git a/sdk-blink/CMakeLists.txt b/sdk-blink/CMakeLists.txt deleted file mode 100644 index 08b5e6e..0000000 --- a/sdk-blink/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -## -## spreadspace rppico utils -## -## -## Copyright (C) 2022 Christian Pointner -## -## This file is part of spreadspace rppico utils. -## -## spreadspace rppico utils is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## any later version. -## -## spreadspace rppico utils is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with spreadspace rppico utils. If not, see . -## - -cmake_minimum_required(VERSION 3.12) -include(../sdk.cmake) - -project(blink C CXX ASM) - -pico_sdk_init() - -add_compile_options(-Wall) - -add_executable(blink - blink.c - ) - -target_link_libraries(blink pico_stdlib) -pico_add_extra_outputs(blink) diff --git a/sdk-blink/Makefile b/sdk-blink/Makefile deleted file mode 100644 index 110de49..0000000 --- a/sdk-blink/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -## -## spreadspace rppico utils -## -## -## Copyright (C) 2022 Christian Pointner -## -## This file is part of spreadspace rppico utils. -## -## spreadspace rppico utils is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## any later version. -## -## spreadspace rppico utils is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with spreadspace rppico utils. If not, see . -## - -PROJECT := blink -PICO_PLATFORM := rp2040 -PICO_BOARD := pico -CMAKE_BUILD_TYPE := Release - -include ../defines.mk -include ../sdk.mk -include ../debug.mk diff --git a/sdk-blink/blink.c b/sdk-blink/blink.c deleted file mode 100644 index d478d78..0000000 --- a/sdk-blink/blink.c +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "pico/stdlib.h" - -int main() { -#ifndef PICO_DEFAULT_LED_PIN -#warning blink example requires a board with a regular LED -#else - const uint LED_PIN = PICO_DEFAULT_LED_PIN; - gpio_init(LED_PIN); - gpio_set_dir(LED_PIN, GPIO_OUT); - while (true) { - gpio_put(LED_PIN, 1); - sleep_ms(250); - gpio_put(LED_PIN, 0); - sleep_ms(250); - } -#endif -} -- cgit v1.2.3