mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 10:17:30 +02:00
ci(mdns): Fix mdns host test layers with static task creation
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@ -212,6 +212,20 @@ void *pthread_task(void *params)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
|
||||||
|
const char *const pcName,
|
||||||
|
const uint32_t ulStackDepth,
|
||||||
|
void *const pvParameters,
|
||||||
|
UBaseType_t uxPriority,
|
||||||
|
StackType_t *const puxStackBuffer,
|
||||||
|
StaticTask_t *const pxTaskBuffer,
|
||||||
|
const BaseType_t xCoreID )
|
||||||
|
{
|
||||||
|
static TaskHandle_t pvCreatedTask;
|
||||||
|
xTaskCreate(pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &pvCreatedTask);
|
||||||
|
return pvCreatedTask;
|
||||||
|
}
|
||||||
|
|
||||||
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
|
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
|
||||||
const char *const pcName,
|
const char *const pcName,
|
||||||
const uint32_t usStackDepth,
|
const uint32_t usStackDepth,
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "esp_heap_caps.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -15,6 +16,9 @@ extern "C" {
|
|||||||
#define TaskHandle_t TaskHandle_t
|
#define TaskHandle_t TaskHandle_t
|
||||||
#define vSemaphoreDelete( xSemaphore ) vQueueDelete( ( QueueHandle_t ) ( xSemaphore ) )
|
#define vSemaphoreDelete( xSemaphore ) vQueueDelete( ( QueueHandle_t ) ( xSemaphore ) )
|
||||||
|
|
||||||
|
typedef void *StackType_t;
|
||||||
|
typedef void *StaticTask_t;
|
||||||
|
|
||||||
void vTaskDelay( const TickType_t xTicksToDelay );
|
void vTaskDelay( const TickType_t xTicksToDelay );
|
||||||
|
|
||||||
void xTaskNotifyGive(TaskHandle_t task);
|
void xTaskNotifyGive(TaskHandle_t task);
|
||||||
@ -25,6 +29,15 @@ TaskHandle_t xTaskGetCurrentTaskHandle(void);
|
|||||||
|
|
||||||
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
|
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
|
||||||
|
|
||||||
|
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
|
||||||
|
const char *const pcName,
|
||||||
|
const uint32_t ulStackDepth,
|
||||||
|
void *const pvParameters,
|
||||||
|
UBaseType_t uxPriority,
|
||||||
|
StackType_t *const puxStackBuffer,
|
||||||
|
StaticTask_t *const pxTaskBuffer,
|
||||||
|
const BaseType_t xCoreID );
|
||||||
|
|
||||||
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
|
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
|
||||||
const char *const pcName,
|
const char *const pcName,
|
||||||
const uint32_t usStackDepth,
|
const uint32_t usStackDepth,
|
||||||
@ -81,6 +94,9 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
|||||||
|
|
||||||
uint32_t xQueueSendToBack(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait );
|
uint32_t xQueueSendToBack(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait );
|
||||||
|
|
||||||
|
void *heap_caps_malloc( size_t size, uint32_t caps);
|
||||||
|
void heap_caps_free( void *ptr);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif //__cplusplus
|
#endif //__cplusplus
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
@ -125,3 +125,13 @@ uint32_t esp_log_timestamp(void)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *heap_caps_malloc(size_t size, uint32_t caps)
|
||||||
|
{
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void heap_caps_free( void *ptr)
|
||||||
|
{
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@ -38,6 +38,10 @@
|
|||||||
#define ESP_ERR_INVALID_RESPONSE 0x108
|
#define ESP_ERR_INVALID_RESPONSE 0x108
|
||||||
#define ESP_ERR_INVALID_CRC 0x109
|
#define ESP_ERR_INVALID_CRC 0x109
|
||||||
|
|
||||||
|
#define MDNS_TASK_MEMORY_LOG "internal RAM"
|
||||||
|
#define MALLOC_CAP_8BIT (1<<2)
|
||||||
|
#define MALLOC_CAP_INTERNAL (1<<11)
|
||||||
|
|
||||||
#define pdTRUE true
|
#define pdTRUE true
|
||||||
#define pdFALSE false
|
#define pdFALSE false
|
||||||
#define pdPASS ( pdTRUE )
|
#define pdPASS ( pdTRUE )
|
||||||
@ -62,6 +66,7 @@
|
|||||||
#define vSemaphoreDelete(s) free(s)
|
#define vSemaphoreDelete(s) free(s)
|
||||||
#define queueQUEUE_TYPE_MUTEX ( ( uint8_t ) 1U
|
#define queueQUEUE_TYPE_MUTEX ( ( uint8_t ) 1U
|
||||||
#define xTaskCreatePinnedToCore(a,b,c,d,e,f,g) *(f) = malloc(1)
|
#define xTaskCreatePinnedToCore(a,b,c,d,e,f,g) *(f) = malloc(1)
|
||||||
|
#define xTaskCreateStaticPinnedToCore(a,b,c,d,e,f,g,h) true
|
||||||
#define vTaskDelay(m) usleep((m)*0)
|
#define vTaskDelay(m) usleep((m)*0)
|
||||||
#define esp_random() (rand()%UINT32_MAX)
|
#define esp_random() (rand()%UINT32_MAX)
|
||||||
|
|
||||||
@ -79,7 +84,8 @@ typedef void *QueueHandle_t;
|
|||||||
typedef void *TaskHandle_t;
|
typedef void *TaskHandle_t;
|
||||||
typedef int BaseType_t;
|
typedef int BaseType_t;
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
|
typedef void *StackType_t;
|
||||||
|
typedef void *StaticTask_t;
|
||||||
|
|
||||||
struct udp_pcb {
|
struct udp_pcb {
|
||||||
uint8_t dummy;
|
uint8_t dummy;
|
||||||
@ -132,5 +138,7 @@ esp_err_t esp_event_handler_unregister(const char *event_base, int32_t event_id,
|
|||||||
TaskHandle_t xTaskGetCurrentTaskHandle(void);
|
TaskHandle_t xTaskGetCurrentTaskHandle(void);
|
||||||
void xTaskNotifyGive(TaskHandle_t task);
|
void xTaskNotifyGive(TaskHandle_t task);
|
||||||
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
|
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
|
||||||
|
void *heap_caps_malloc(size_t size, uint32_t caps);
|
||||||
|
void heap_caps_free(void *ptr);
|
||||||
|
|
||||||
#endif //_ESP32_COMPAT_H_
|
#endif //_ESP32_COMPAT_H_
|
||||||
|
Reference in New Issue
Block a user