diff --git a/cpu/esp32/include/freertos/FreeRTOS.h b/cpu/esp32/include/freertos/FreeRTOS.h deleted file mode 100644 index 95c34b03df..0000000000 --- a/cpu/esp32/include/freertos/FreeRTOS.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_FREERTOS_H -#define FREERTOS_FREERTOS_H - -#ifndef DOXYGEN - -#include "freertos/portmacro.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define configMAX_PRIORITIES SCHED_PRIO_LEVELS - -#ifndef configASSERT -#define configASSERT assert -#endif - -#define portTICK_PERIOD_MS 10 -#define portTickType TickType_t - -typedef int32_t BaseType_t; -typedef uint32_t UBaseType_t; -typedef uint32_t TickType_t; - -uint32_t xPortGetTickRateHz(void); -BaseType_t xPortInIsrContext(void); - -/* - * PLESE NOTE: Following definitions were copied directly from the FreeRTOS - * distribution and are under the following copyright: - * - * FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd. - * All rights reserved - * - * FreeRTOS is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License (version 2) as published by the - * Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - * - * Full license text is available on the following - * link: http://www.freertos.org/a00114.html - */ - -#define pdFALSE ( ( BaseType_t ) 0 ) -#define pdTRUE ( ( BaseType_t ) 1 ) -#define pdPASS ( pdTRUE ) -#define pdFAIL ( pdFALSE ) - -#ifdef __cplusplus -} -#endif - -#include "freertos/semphr.h" -#include "freertos/queue.h" - -#endif /* DOXYGEN */ -#endif /* FREERTOS_FREERTOS_H */ diff --git a/cpu/esp32/include/freertos/event_groups.h b/cpu/esp32/include/freertos/event_groups.h deleted file mode 100644 index 12405cf574..0000000000 --- a/cpu/esp32/include/freertos/event_groups.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_EVENT_GROUPS_H -#define FREERTOS_EVENT_GROUPS_H - -#ifndef DOXYGEN - -#include "freertos/FreeRTOS.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void * EventGroupHandle_t; -typedef TickType_t EventBits_t; - -EventGroupHandle_t xEventGroupCreate (void); - -void vEventGroupDelete (EventGroupHandle_t xEventGroup); - -EventBits_t xEventGroupSetBits (EventGroupHandle_t xEventGroup, - const EventBits_t uxBitsToSet); - -EventBits_t xEventGroupClearBits (EventGroupHandle_t xEventGroup, - const EventBits_t uxBitsToClear ); - -EventBits_t xEventGroupWaitBits (const EventGroupHandle_t xEventGroup, - const EventBits_t uxBitsToWaitFor, - const BaseType_t xClearOnExit, - const BaseType_t xWaitForAllBits, - TickType_t xTicksToWait); - -#ifdef __cplusplus -} -#endif - -#endif /* DOXYGEN */ -#endif /* FREERTOS_EVENT_GROUPS_H */ diff --git a/cpu/esp32/include/freertos/portmacro.h b/cpu/esp32/include/freertos/portmacro.h deleted file mode 100644 index f4f6f4b70d..0000000000 --- a/cpu/esp32/include/freertos/portmacro.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_PORTMACRO_H -#define FREERTOS_PORTMACRO_H - -#ifndef DOXYGEN - -#include "stdint.h" - -#include "mutex.h" -#include "irq.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define portBASE_TYPE int32_t -#define portUBASE_TYPE uint32_t - -#define portMAX_DELAY 0xFFFFFFFF - -#define portMUX_TYPE mutex_t -#define portMUX_INITIALIZER_UNLOCKED MUTEX_INIT - -#define portENTER_CRITICAL(mux) vTaskEnterCritical(mux) -#define portEXIT_CRITICAL(mux) vTaskExitCritical(mux) -#define portENTER_CRITICAL_NESTED irq_disable -#define portEXIT_CRITICAL_NESTED irq_restore - -#define portENTER_CRITICAL_ISR(mux) vTaskEnterCritical(mux) -#define portEXIT_CRITICAL_ISR(mux) vTaskExitCritical(mux) - -#define taskENTER_CRITICAL(mux) portENTER_CRITICAL(mux) -#define taskENTER_CRITICAL_ISR(mux) portENTER_CRITICAL_ISR(mux) -#define taskEXIT_CRITICAL(mux) portEXIT_CRITICAL(mux) -#define taskEXIT_CRITICAL_ISR(mux) portEXIT_CRITICAL_ISR(mux) - -#define portYIELD_FROM_ISR thread_yield_higher -#define portNUM_PROCESSORS 2 - -#define xPortGetCoreID() PRO_CPU_NUM - -extern void vTaskEnterCritical(portMUX_TYPE *mux); -extern void vTaskExitCritical(portMUX_TYPE *mux); - -#ifdef __cplusplus -} -#endif - -#endif /* DOXYGEN */ -#endif /* FREERTOS_PORTMACRO_H */ diff --git a/cpu/esp32/include/freertos/queue.h b/cpu/esp32/include/freertos/queue.h deleted file mode 100644 index 3649e2bd4f..0000000000 --- a/cpu/esp32/include/freertos/queue.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_QUEUE_H -#define FREERTOS_QUEUE_H - -#ifndef DOXYGEN - -#include "freertos/FreeRTOS.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define xQueueHandle QueueHandle_t - -typedef void* QueueHandle_t; - -QueueHandle_t xQueueGenericCreate (const UBaseType_t uxQueueLength, - const UBaseType_t uxItemSize, - const uint8_t ucQueueType); - -QueueHandle_t xQueueCreateCountingSemaphore (const UBaseType_t uxMaxCount, - const UBaseType_t uxInitialCount); - -void vQueueDelete (QueueHandle_t xQueue); - -BaseType_t xQueueGenericReset (QueueHandle_t xQueue, BaseType_t xNewQueue); - -BaseType_t xQueueGenericReceive (QueueHandle_t xQueue, - void * const pvBuffer, - TickType_t xTicksToWait, - const BaseType_t xJustPeeking); - -BaseType_t xQueueGenericSend (QueueHandle_t xQueue, - const void * const pvItemToQueue, - TickType_t xTicksToWait, - const BaseType_t xCopyPosition); - -BaseType_t xQueueReceiveFromISR (QueueHandle_t xQueue, void * const pvBuffer, - BaseType_t * const pxHigherPriorityTaskWoken); - -BaseType_t xQueueGenericSendFromISR (QueueHandle_t xQueue, - const void * const pvItemToQueue, - BaseType_t * const pxHigherPriorityTaskWoken, - const BaseType_t xCopyPosition ); - -BaseType_t xQueueGiveFromISR (QueueHandle_t xQueue, - BaseType_t * const pxHigherPriorityTaskWoken); - -UBaseType_t uxQueueMessagesWaiting( QueueHandle_t xQueue ); - -/* - * PLESE NOTE: Following definitions were copied directly from the FreeRTOS - * distribution and are under the following copyright: - * - * FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd. - * All rights reserved - * - * FreeRTOS is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License (version 2) as published by the - * Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - * - * Full license text is available on the following - * link: http://www.freertos.org/a00114.html - */ - -#define queueSEND_TO_BACK ( ( BaseType_t ) 0 ) -#define queueSEND_TO_FRONT ( ( BaseType_t ) 1 ) -#define queueOVERWRITE ( ( BaseType_t ) 2 ) - -#define queueQUEUE_TYPE_BASE ( ( uint8_t ) 0U ) -#define queueQUEUE_TYPE_SET ( ( uint8_t ) 0U ) -#define queueQUEUE_TYPE_MUTEX ( ( uint8_t ) 1U ) -#define queueQUEUE_TYPE_COUNTING_SEMAPHORE ( ( uint8_t ) 2U ) -#define queueQUEUE_TYPE_BINARY_SEMAPHORE ( ( uint8_t ) 3U ) -#define queueQUEUE_TYPE_RECURSIVE_MUTEX ( ( uint8_t ) 4U ) - -#define errQUEUE_EMPTY ( ( BaseType_t ) 0 ) -#define errQUEUE_FULL ( ( BaseType_t ) 0 ) -#define errQUEUE_BLOCKED ( -4 ) -#define errQUEUE_YIELD ( -5 ) - -#define xQueueCreate( uxQueueLength, uxItemSize ) \ - xQueueGenericCreate( ( uxQueueLength ), ( uxItemSize ), ( queueQUEUE_TYPE_BASE ) ) - -#define xQueueReceive( xQueue, pvBuffer, xTicksToWait ) \ - xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), \ - pdFALSE ) - -#define xQueueSend( xQueue, pvItemToQueue, xTicksToWait ) \ - xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), \ - queueSEND_TO_BACK ) - -#define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) \ - xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), \ - queueSEND_TO_BACK ) - -#define xQueueSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) \ - xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), \ - ( pxHigherPriorityTaskWoken ), \ - queueSEND_TO_BACK ) - -#define xQueueReset( xQueue ) xQueueGenericReset( xQueue, pdFALSE ) - -#ifdef __cplusplus -} -#endif - -#endif /* DOXYGEN */ -#endif /* FREERTOS_QUEUE_H */ diff --git a/cpu/esp32/include/freertos/semphr.h b/cpu/esp32/include/freertos/semphr.h deleted file mode 100644 index c1cdec23e0..0000000000 --- a/cpu/esp32/include/freertos/semphr.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_SEMPHR_H -#define FREERTOS_SEMPHR_H - -#ifndef DOXYGEN - -#include "freertos/FreeRTOS.h" - -#include -#include "mutex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void* SemaphoreHandle_t; - -SemaphoreHandle_t xSemaphoreCreateMutex(void); -SemaphoreHandle_t xSemaphoreCreateRecursiveMutex(void); - -void vSemaphoreDelete (SemaphoreHandle_t xSemaphore); - -BaseType_t xSemaphoreGive (SemaphoreHandle_t xSemaphore); -BaseType_t xSemaphoreTake (SemaphoreHandle_t xSemaphore, - TickType_t xTicksToWait); -BaseType_t xSemaphoreGiveRecursive (SemaphoreHandle_t xSemaphore); -BaseType_t xSemaphoreTakeRecursive (SemaphoreHandle_t xSemaphore, - TickType_t xTicksToWait); - -#define vPortCPUInitializeMutex(m) mutex_init(m) - -void vPortCPUAcquireMutex (portMUX_TYPE *mux); -void vPortCPUReleaseMutex (portMUX_TYPE *mux); - -/* - * PLESE NOTE: Following definitions were copied directly from the FreeRTOS - * distribution and are under the following copyright: - * - * FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd. - * All rights reserved - * - * FreeRTOS is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License (version 2) as published by the - * Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - * - * Full license text is available on the following - * link: http://www.freertos.org/a00114.html - */ - -#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( uint8_t ) 0U ) - -#define xSemaphoreCreateBinary() \ - xQueueGenericCreate( ( UBaseType_t ) 1, \ - semSEMAPHORE_QUEUE_ITEM_LENGTH, \ - queueQUEUE_TYPE_BINARY_SEMAPHORE ) -#define xSemaphoreCreateCounting( uxMaxCount, uxInitialCount ) \ - xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) ) - -#define xSemaphoreTakeFromISR( xSemaphore, pxHigherPriorityTaskWoken ) \ - xQueueReceiveFromISR( ( QueueHandle_t ) ( xSemaphore ), \ - NULL, ( pxHigherPriorityTaskWoken ) ) - -#define xSemaphoreGiveFromISR( xSemaphore, pxHigherPriorityTaskWoken ) \ - xQueueGiveFromISR( ( QueueHandle_t ) ( xSemaphore ), \ - ( pxHigherPriorityTaskWoken ) ) - -#ifdef __cplusplus -} -#endif - -#endif /* DOXYGEN */ -#endif /* FREERTOS_SEMPHR_H */ diff --git a/cpu/esp32/include/freertos/task.h b/cpu/esp32/include/freertos/task.h deleted file mode 100644 index fc416ee6a0..0000000000 --- a/cpu/esp32/include/freertos/task.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_TASK_H -#define FREERTOS_TASK_H - -#ifndef DOXYGEN - -#include "thread.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define xTaskHandle TaskHandle_t -#define tskNO_AFFINITY INT_MAX - -typedef void (*TaskFunction_t)(void *); - -typedef void* TaskHandle_t; - -BaseType_t xTaskCreate (TaskFunction_t pvTaskCode, - const char * const pcName, - const uint32_t usStackDepth, - void * const pvParameters, - UBaseType_t uxPriority, - TaskHandle_t * const pvCreatedTask); - -BaseType_t xTaskCreatePinnedToCore (TaskFunction_t pvTaskCode, - const char * const pcName, - const uint32_t usStackDepth, - void * const pvParameters, - UBaseType_t uxPriority, - TaskHandle_t * const pvCreatedTask, - const BaseType_t xCoreID); - -void vTaskDelete (TaskHandle_t xTaskToDelete); -void vTaskDelay (const TickType_t xTicksToDelay); - -TaskHandle_t xTaskGetCurrentTaskHandle (void); - -void vTaskEnterCritical (portMUX_TYPE *mux); -void vTaskExitCritical (portMUX_TYPE *mux); - -TickType_t xTaskGetTickCount (void); - -#ifdef __cplusplus -} -#endif - -#endif /* DOXYGEN */ -#endif /* FREERTOS_TASK_H */ diff --git a/cpu/esp32/include/freertos/timers.h b/cpu/esp32/include/freertos/timers.h deleted file mode 100644 index 388bde3992..0000000000 --- a/cpu/esp32/include/freertos/timers.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_TIMERS_H -#define FREERTOS_TIMERS_H - -#ifndef DOXYGEN - -#include "freertos/FreeRTOS.h" -#include "xtimer.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void* TimerHandle_t; - -#define TimerCallbackFunction_t xtimer_callback_t - -TimerHandle_t xTimerCreate (const char * const pcTimerName, - const TickType_t xTimerPeriod, - const UBaseType_t uxAutoReload, - void * const pvTimerID, - TimerCallbackFunction_t pxCallbackFunction); -BaseType_t xTimerDelete(TimerHandle_t xTimer, TickType_t xBlockTime); -BaseType_t xTimerStart (TimerHandle_t xTimer, TickType_t xBlockTime); -BaseType_t xTimerStop (TimerHandle_t xTimer, TickType_t xBlockTime); - -#ifdef __cplusplus -} -#endif - -#endif /* DOXYGEN */ -#endif /* FREERTOS_TIMERS_H */ diff --git a/cpu/esp32/include/freertos/xtensa_api.h b/cpu/esp32/include/freertos/xtensa_api.h deleted file mode 100644 index 70db1b55bc..0000000000 --- a/cpu/esp32/include/freertos/xtensa_api.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2018 Gunar Schorcht - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - * - * FreeRTOS to RIOT-OS adaption module for source code compatibility - */ - -#ifndef FREERTOS_XTENSA_API_H -#define FREERTOS_XTENSA_API_H - -#include "xtensa/xtensa_api.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* FREERTOS_XTENSA_API_H */ diff --git a/cpu/esp8266/Makefile.include b/cpu/esp8266/Makefile.include index f56a75c3a8..ddfad8187b 100644 --- a/cpu/esp8266/Makefile.include +++ b/cpu/esp8266/Makefile.include @@ -41,7 +41,6 @@ USEMODULE += ps INCLUDES += -I$(RIOTCPU)/$(CPU) INCLUDES += -I$(RIOTCPU)/$(CPU)/include -INCLUDES += -I$(RIOTCPU)/$(CPU)/include/freertos INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/ INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/bootloader_support/include diff --git a/cpu/esp_common/Makefile.include b/cpu/esp_common/Makefile.include index c3be63494e..87d0483589 100644 --- a/cpu/esp_common/Makefile.include +++ b/cpu/esp_common/Makefile.include @@ -58,6 +58,7 @@ USEMODULE += xtensa INCLUDES += -I$(RIOTBOARD)/common/$(CPU)/include INCLUDES += -I$(RIOTCPU)/esp_common INCLUDES += -I$(RIOTCPU)/esp_common/include +INCLUDES += -I$(RIOTCPU)/esp_common/include/freertos INCLUDES += -I$(RIOTCPU)/esp_common/vendor/ INCLUDES += -I$(RIOTCPU)/esp_common/vendor/esp diff --git a/cpu/esp8266/include/freertos/FreeRTOS.h b/cpu/esp_common/include/freertos/FreeRTOS.h similarity index 97% rename from cpu/esp8266/include/freertos/FreeRTOS.h rename to cpu/esp_common/include/freertos/FreeRTOS.h index e333cfd722..0331206d6e 100644 --- a/cpu/esp8266/include/freertos/FreeRTOS.h +++ b/cpu/esp_common/include/freertos/FreeRTOS.h @@ -22,7 +22,7 @@ extern "C" { #define configMAX_PRIORITIES SCHED_PRIO_LEVELS #ifndef configASSERT -#define configASSERT assert +#define configASSERT assert #endif #define portTICK_PERIOD_MS 10 diff --git a/cpu/esp8266/include/freertos/event_groups.h b/cpu/esp_common/include/freertos/event_groups.h similarity index 100% rename from cpu/esp8266/include/freertos/event_groups.h rename to cpu/esp_common/include/freertos/event_groups.h diff --git a/cpu/esp8266/include/freertos/portmacro.h b/cpu/esp_common/include/freertos/portmacro.h similarity index 92% rename from cpu/esp8266/include/freertos/portmacro.h rename to cpu/esp_common/include/freertos/portmacro.h index b0df76c65a..6927fbfcaf 100644 --- a/cpu/esp8266/include/freertos/portmacro.h +++ b/cpu/esp_common/include/freertos/portmacro.h @@ -32,29 +32,28 @@ extern "C" { #define portYIELD_FROM_ISR thread_yield_higher +#define portENTER_CRITICAL vTaskEnterCritical +#define portEXIT_CRITICAL vTaskExitCritical +#define portENTER_CRITICAL_ISR vTaskEnterCritical +#define portEXIT_CRITICAL_ISR vTaskExitCritical +#define portENTER_CRITICAL_NESTED irq_disable +#define portEXIT_CRITICAL_NESTED irq_restore + #ifdef MCU_ESP32 #define portNUM_PROCESSORS 2 #define xPortGetCoreID() PRO_CPU_NUM -#define portENTER_CRITICAL(pm) mutex_lock(pm) -#define portEXIT_CRITICAL(pm) mutex_unlock(pm) -#define portENTER_CRITICAL_NESTED irq_disable -#define portEXIT_CRITICAL_NESTED irq_restore - -#define portENTER_CRITICAL_ISR vTaskEnterCritical -#define portEXIT_CRITICAL_ISR vTaskExitCritical - #else /* MCU_ESP32 */ #define portNUM_PROCESSORS 1 #define xPortGetCoreID() PRO_CPU_NUM -#define portENTER_CRITICAL vTaskEnterCritical -#define portEXIT_CRITICAL vTaskExitCritical - #endif /* MCU_ESP32 */ +extern void vTaskEnterCritical(portMUX_TYPE *mux); +extern void vTaskExitCritical(portMUX_TYPE *mux); + #ifdef __cplusplus } #endif diff --git a/cpu/esp8266/include/freertos/queue.h b/cpu/esp_common/include/freertos/queue.h similarity index 100% rename from cpu/esp8266/include/freertos/queue.h rename to cpu/esp_common/include/freertos/queue.h diff --git a/cpu/esp8266/include/freertos/semphr.h b/cpu/esp_common/include/freertos/semphr.h similarity index 100% rename from cpu/esp8266/include/freertos/semphr.h rename to cpu/esp_common/include/freertos/semphr.h diff --git a/cpu/esp8266/include/freertos/task.h b/cpu/esp_common/include/freertos/task.h similarity index 93% rename from cpu/esp8266/include/freertos/task.h rename to cpu/esp_common/include/freertos/task.h index 0f0a958390..7d99e2209d 100644 --- a/cpu/esp8266/include/freertos/task.h +++ b/cpu/esp_common/include/freertos/task.h @@ -14,6 +14,7 @@ #ifndef DOXYGEN #include "thread.h" +#include "freertos/FreeRTOS.h" #ifdef __cplusplus extern "C" { @@ -23,7 +24,7 @@ extern "C" { #define tskNO_AFFINITY INT_MAX #define taskDISABLE_INTERRUPTS portDISABLE_INTERRUPTS -#define taskENABLE_INTERRUPTS portENABLE_INTERRUPTS +#define taskENABLE_INTERRUPTS portENABLE_INTERRUPTS #define taskENTER_CRITICAL portENTER_CRITICAL #define taskEXIT_CRITICAL portEXIT_CRITICAL @@ -55,7 +56,7 @@ TaskHandle_t xTaskGetCurrentTaskHandle(void); void vTaskEnterCritical(portMUX_TYPE *mux); void vTaskExitCritical(portMUX_TYPE *mux); -TickType_t xTaskGetTickCount (void); +TickType_t xTaskGetTickCount(void); #ifdef __cplusplus } diff --git a/cpu/esp8266/include/freertos/timers.h b/cpu/esp_common/include/freertos/timers.h similarity index 100% rename from cpu/esp8266/include/freertos/timers.h rename to cpu/esp_common/include/freertos/timers.h diff --git a/cpu/esp8266/include/freertos/xtensa_api.h b/cpu/esp_common/include/freertos/xtensa_api.h similarity index 100% rename from cpu/esp8266/include/freertos/xtensa_api.h rename to cpu/esp_common/include/freertos/xtensa_api.h