1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

cpu/esp_common/freertos: changes required for BLE

This commit is contained in:
Gunar Schorcht 2022-08-11 10:03:11 +02:00
parent b74bf015ef
commit cdc8a725a4
5 changed files with 39 additions and 6 deletions

View File

@ -95,7 +95,8 @@ QueueHandle_t xQueueCreateCountingSemaphore (const UBaseType_t uxMaxCount,
queue = xQueueGenericCreate(uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH,
queueQUEUE_TYPE_COUNTING_SEMAPHORE);
DEBUG("%s pid=%d queue=%p\n", __func__, thread_getpid(), queue);
DEBUG("%s pid=%d queue=%p max=%d initial=%d\n", __func__,
thread_getpid(), queue, uxMaxCount, uxInitialCount);
if (queue != NULL) {
queue->item_level = uxInitialCount;
@ -509,11 +510,12 @@ UBaseType_t uxQueueMessagesWaiting( QueueHandle_t xQueue )
BaseType_t xQueueGiveFromISR (QueueHandle_t xQueue,
BaseType_t * const pxHigherPriorityTaskWoken)
{
/* this function only satisfies the linker and should not be called */
assert(0);
DEBUG("%s pid=%d prio=%d queue=%p woken=%p\n", __func__,
thread_getpid(), thread_get_priority(thread_get_active()),
xQueue, pxHigherPriorityTaskWoken);
DEBUG("%s\n", __func__);
return pdFALSE;
return _queue_generic_send(xQueue, NULL, queueSEND_TO_BACK,
0, pxHigherPriorityTaskWoken);
}
#endif /* DOXYGEN */

View File

@ -26,8 +26,9 @@ extern "C" {
#define configASSERT assert
#endif
#define portTICK_PERIOD_MS 10
#define configTICK_RATE_HZ ((TickType_t)100)
#define portTICK_PERIOD_MS 10
#define portTICK_RATE_MS portTICK_PERIOD_MS
#define BaseType_t portBASE_TYPE

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2022 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
*/
/* Empty file, only required for source code compatibility */
#ifndef FREERTOS_PORTABLE_H
#define FREERTOS_PORTABLE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /* FREERTOS_PORTABLE_H */

View File

@ -108,6 +108,11 @@ UBaseType_t uxQueueMessagesWaiting( QueueHandle_t xQueue );
( pxHigherPriorityTaskWoken ), \
queueSEND_TO_BACK )
#define xQueueSendToBackFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) \
xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), \
( pxHigherPriorityTaskWoken ), \
queueSEND_TO_BACK )
#define xQueueOverwriteFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) \
xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), \
( pxHigherPriorityTaskWoken ), \

View File

@ -31,6 +31,7 @@ extern "C" {
#define taskENTER_CRITICAL portENTER_CRITICAL
#define taskEXIT_CRITICAL portEXIT_CRITICAL
#define taskSCHEDULER_NOT_STARTED 1
#define taskSCHEDULER_RUNNING 2
typedef enum {