radio: inital commit

This commit is contained in:
MReenen
2022-08-30 14:54:10 +02:00
parent 7f12071e51
commit fbc9e9f4fb
3 changed files with 35 additions and 0 deletions

9
radio/CMakeLists.txt Normal file
View File

@@ -0,0 +1,9 @@
add_executable(radio
main.c
)
# pull in common dependencies
target_link_libraries(radio pico_stdlib)
# create map/bin/hex file etc.
pico_add_extra_outputs(radio)

23
radio/main.c Normal file
View File

@@ -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
}