1 // Copyright 2021 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 #pragma once
15 
16 #include "freertos/FreeRTOS.h"
17 
18 #define xTaskHandle TaskHandle_t
19 #define vSemaphoreDelete( xSemaphore ) vQueueDelete( ( QueueHandle_t ) ( xSemaphore ) )
20 
21 void vTaskDelay( const TickType_t xTicksToDelay );
22 
23 void xTaskNotifyGive(TaskHandle_t task);
24 
25 TaskHandle_t xTaskGetCurrentTaskHandle(void);
26 
27 BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
28 
29 BaseType_t xTaskCreatePinnedToCore(	TaskFunction_t pvTaskCode,
30                                        const char * const pcName,
31                                        const uint32_t usStackDepth,
32                                        void * const pvParameters,
33                                        UBaseType_t uxPriority,
34                                        TaskHandle_t * const pvCreatedTask,
35                                        const BaseType_t xCoreID);
36 
37 void xTaskCreate(TaskFunction_t pvTaskCode, const char * const pcName, const uint32_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pvCreatedTask);
38 
39 TickType_t xTaskGetTickCount( void );
40 
41 void vQueueDelete( QueueHandle_t xQueue );
42 
43 QueueHandle_t xSemaphoreCreateBinary(void);
44 
45 QueueHandle_t xSemaphoreCreateMutex(void);
46 
47 BaseType_t xSemaphoreGive( QueueHandle_t xQueue);
48 
49 BaseType_t xSemaphoreTake( QueueHandle_t xQueue, TickType_t pvTask );
50 
51 void vTaskDelete(TaskHandle_t *task);
52 
53 QueueHandle_t xQueueCreate( uint32_t uxQueueLength,
54                             uint32_t uxItemSize );
55 
56 uint32_t xQueueSend(QueueHandle_t xQueue, const void * pvItemToQueue, TickType_t xTicksToWait);
57 
58 uint32_t xQueueReceive(QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksToWait);
59