mirror of
https://github.com/lukstep/raspberry-pi-pico-docker-sdk.git
synced 2025-12-22 18:45:56 +03:00
Test freertos_test_project build
This commit is contained in:
@@ -26,4 +26,6 @@ target_link_libraries(freertos_demo
|
||||
FreeRTOS-Kernel
|
||||
FreeRTOS-Kernel-Heap4)
|
||||
|
||||
pico_enable_stdio_usb(freertos_demo 1)
|
||||
pico_enable_stdio_uart(freertos_demo 1)
|
||||
pico_add_extra_outputs(freertos_demo)
|
||||
|
||||
@@ -16,30 +16,26 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) {}
|
||||
void vApplicationTickHook( void ) {}
|
||||
void vApplicationMallocFailedHook( void ) {}
|
||||
|
||||
constexpr int LED_PIN = 25;
|
||||
|
||||
void vBlink(void* unused_arg) {
|
||||
stdio_init_all();
|
||||
for (;;) {
|
||||
|
||||
for (;;) {
|
||||
|
||||
gpio_put(PICO_DEFAULT_LED_PIN, 1);
|
||||
|
||||
vTaskDelay(250);
|
||||
|
||||
gpio_put(PICO_DEFAULT_LED_PIN, 0);
|
||||
|
||||
vTaskDelay(250);
|
||||
|
||||
}
|
||||
|
||||
gpio_put(LED_PIN, 1);
|
||||
vTaskDelay(250);
|
||||
gpio_put(LED_PIN, 0);
|
||||
puts("Hello FreeRTOS\n");
|
||||
vTaskDelay(250);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
gpio_init(LED_PIN);
|
||||
|
||||
gpio_init(PICO_DEFAULT_LED_PIN);
|
||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||
|
||||
gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
|
||||
|
||||
xTaskCreate(vBlink, "Blink", 128, NULL, 1, NULL);
|
||||
|
||||
vTaskStartScheduler();
|
||||
xTaskCreate(vBlink, "Blink", 128, NULL, 1, NULL);
|
||||
|
||||
vTaskStartScheduler();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user