Trying to move project->FreeRTOS (WIP)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
cmake_minimum_required(VERSION 3.5.0)
|
||||
|
||||
set(APP_NAME "Blinky")
|
||||
|
||||
add_executable(${APP_NAME}
|
||||
./main.c
|
||||
)
|
||||
|
||||
target_include_directories(Blinky
|
||||
PUBLIC ${FREERTOS_ROOT}/include/
|
||||
)
|
||||
|
||||
target_link_libraries(Blinky LINK_PUBLIC
|
||||
pico_stdlib
|
||||
FreeRTOS-Kernel
|
||||
FreeRTOS-Kernel-Heap4
|
||||
)
|
||||
|
||||
get_test_property(FUCKASS Blinky INCLUDE_DIRECTORIES)
|
||||
|
||||
message(STATUS "Includes are ${FUCKASS}")
|
||||
|
||||
pico_enable_stdio_usb(${APP_NAME} 1)
|
||||
pico_enable_stdio_uart(${APP_NAME} 0)
|
||||
|
||||
pico_add_extra_outputs(${APP_NAME})
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <pico/stdlib.h>
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
void vBlinkTask() {
|
||||
for (;;) {
|
||||
gpio_put(PICO_DEFAULT_LED_PIN, 1);
|
||||
vTaskDelay(250);
|
||||
gpio_put(PICO_DEFAULT_LED_PIN, 0);
|
||||
vTaskDelay(250);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
gpio_init(PICO_DEFAULT_LED_PIN);
|
||||
gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
|
||||
xTaskCreate(vBlinkTask, "Blink task", 128, NULL, 1, NULL);
|
||||
vTaskStartScheduler();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user