Working variant of esp_iot_rtos_sdk (files from commit ec75c85f9ef53)
This commit is contained in:
parent
101c8648ea
commit
1ffbc303ff
124 changed files with 19424 additions and 592 deletions
|
|
@ -75,7 +75,7 @@ task.h is included from an application file. */
|
|||
#include "queue.h"
|
||||
|
||||
#if ( configUSE_CO_ROUTINES == 1 )
|
||||
#include "croutine.h"
|
||||
#include "freertos/croutine.h"
|
||||
#endif
|
||||
|
||||
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the
|
||||
|
|
@ -235,7 +235,8 @@ static void prvCopyDataFromQueue( xQUEUE * const pxQueue, const void * const pvB
|
|||
taskEXIT_CRITICAL()
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xQueueGenericReset( xQueueHandle xQueue, portBASE_TYPE xNewQueue )
|
||||
portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueGenericReset( xQueueHandle xQueue, portBASE_TYPE xNewQueue )
|
||||
{
|
||||
xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
||||
|
||||
|
|
@ -280,7 +281,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xQueueHandle xQueueGenericCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType )
|
||||
xQueueHandle ICACHE_FLASH_ATTR
|
||||
xQueueGenericCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType )
|
||||
{
|
||||
xQUEUE *pxNewQueue;
|
||||
size_t xQueueSizeInBytes;
|
||||
|
|
@ -340,7 +342,8 @@ xQueueHandle xReturn = NULL;
|
|||
|
||||
#if ( configUSE_MUTEXES == 1 )
|
||||
|
||||
xQueueHandle xQueueCreateMutex( unsigned char ucQueueType )
|
||||
xQueueHandle ICACHE_FLASH_ATTR
|
||||
xQueueCreateMutex( unsigned char ucQueueType )
|
||||
{
|
||||
xQUEUE *pxNewQueue;
|
||||
|
||||
|
|
@ -405,7 +408,8 @@ xQueueHandle xReturn = NULL;
|
|||
|
||||
#if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) )
|
||||
|
||||
void* xQueueGetMutexHolder( xQueueHandle xSemaphore )
|
||||
void* ICACHE_FLASH_ATTR
|
||||
xQueueGetMutexHolder( xQueueHandle xSemaphore )
|
||||
{
|
||||
void *pxReturn;
|
||||
|
||||
|
|
@ -435,7 +439,8 @@ xQueueHandle xReturn = NULL;
|
|||
|
||||
#if ( configUSE_RECURSIVE_MUTEXES == 1 )
|
||||
|
||||
portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle xMutex )
|
||||
portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueGiveMutexRecursive( xQueueHandle xMutex )
|
||||
{
|
||||
portBASE_TYPE xReturn;
|
||||
xQUEUE * const pxMutex = ( xQUEUE * ) xMutex;
|
||||
|
|
@ -485,7 +490,8 @@ xQueueHandle xReturn = NULL;
|
|||
|
||||
#if ( configUSE_RECURSIVE_MUTEXES == 1 )
|
||||
|
||||
portBASE_TYPE xQueueTakeMutexRecursive( xQueueHandle xMutex, portTickType xBlockTime )
|
||||
portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueTakeMutexRecursive( xQueueHandle xMutex, portTickType xBlockTime )
|
||||
{
|
||||
portBASE_TYPE xReturn;
|
||||
xQUEUE * const pxMutex = ( xQUEUE * ) xMutex;
|
||||
|
|
@ -526,7 +532,8 @@ xQueueHandle xReturn = NULL;
|
|||
|
||||
#if ( configUSE_COUNTING_SEMAPHORES == 1 )
|
||||
|
||||
xQueueHandle xQueueCreateCountingSemaphore( unsigned portBASE_TYPE uxCountValue, unsigned portBASE_TYPE uxInitialCount )
|
||||
xQueueHandle ICACHE_FLASH_ATTR
|
||||
xQueueCreateCountingSemaphore( unsigned portBASE_TYPE uxCountValue, unsigned portBASE_TYPE uxInitialCount )
|
||||
{
|
||||
xQueueHandle xHandle;
|
||||
|
||||
|
|
@ -550,7 +557,8 @@ xQueueHandle xReturn = NULL;
|
|||
#endif /* configUSE_COUNTING_SEMAPHORES */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition )
|
||||
signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition )
|
||||
{
|
||||
signed portBASE_TYPE xEntryTimeSet = pdFALSE;
|
||||
xTimeOutType xTimeOut;
|
||||
|
|
@ -712,7 +720,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
|
||||
#if ( configUSE_ALTERNATIVE_API == 1 )
|
||||
|
||||
signed portBASE_TYPE xQueueAltGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition )
|
||||
signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueAltGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition )
|
||||
{
|
||||
signed portBASE_TYPE xEntryTimeSet = pdFALSE;
|
||||
xTimeOutType xTimeOut;
|
||||
|
|
@ -790,7 +799,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
|
||||
#if ( configUSE_ALTERNATIVE_API == 1 )
|
||||
|
||||
signed portBASE_TYPE xQueueAltGenericReceive( xQueueHandle xQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking )
|
||||
signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueAltGenericReceive( xQueueHandle xQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking )
|
||||
{
|
||||
signed portBASE_TYPE xEntryTimeSet = pdFALSE;
|
||||
xTimeOutType xTimeOut;
|
||||
|
|
@ -920,7 +930,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
#endif /* configUSE_ALTERNATIVE_API */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle xQueue, const void * const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition )
|
||||
signed portBASE_TYPE
|
||||
xQueueGenericSendFromISR( xQueueHandle xQueue, const void * const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
||||
|
|
@ -951,7 +962,9 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
queue read, instead we return a flag to say whether a context switch is
|
||||
required or not (i.e. has a task with a higher priority than us been woken
|
||||
by this post). */
|
||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
// uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
|
||||
{
|
||||
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
||||
{
|
||||
|
|
@ -1032,7 +1045,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, const void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking )
|
||||
signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueGenericReceive( xQueueHandle xQueue, const void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking )
|
||||
{
|
||||
signed portBASE_TYPE xEntryTimeSet = pdFALSE;
|
||||
xTimeOutType xTimeOut;
|
||||
|
|
@ -1187,7 +1201,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle xQueue, const void * const pvBuffer, signed portBASE_TYPE *pxHigherPriorityTaskWoken )
|
||||
signed portBASE_TYPE
|
||||
xQueueReceiveFromISR( xQueueHandle xQueue, const void * const pvBuffer, signed portBASE_TYPE *pxHigherPriorityTaskWoken )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
||||
|
|
@ -1212,7 +1227,9 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||
|
||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
// uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
|
||||
{
|
||||
/* Cannot block in an ISR, so check there is data available. */
|
||||
if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )
|
||||
|
|
@ -1262,7 +1279,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xQueuePeekFromISR( xQueueHandle xQueue, const void * const pvBuffer )
|
||||
signed portBASE_TYPE
|
||||
xQueuePeekFromISR( xQueueHandle xQueue, const void * const pvBuffer )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
||||
|
|
@ -1288,7 +1306,9 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||
|
||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
// uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
|
||||
{
|
||||
/* Cannot block in an ISR, so check there is data available. */
|
||||
if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )
|
||||
|
|
@ -1315,7 +1335,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle xQueue )
|
||||
unsigned portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
uxQueueMessagesWaiting( const xQueueHandle xQueue )
|
||||
{
|
||||
unsigned portBASE_TYPE uxReturn;
|
||||
|
||||
|
|
@ -1329,7 +1350,8 @@ unsigned portBASE_TYPE uxReturn;
|
|||
} /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle xQueue )
|
||||
unsigned portBASE_TYPE
|
||||
uxQueueMessagesWaitingFromISR( const xQueueHandle xQueue )
|
||||
{
|
||||
unsigned portBASE_TYPE uxReturn;
|
||||
|
||||
|
|
@ -1341,7 +1363,8 @@ unsigned portBASE_TYPE uxReturn;
|
|||
} /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vQueueDelete( xQueueHandle xQueue )
|
||||
void ICACHE_FLASH_ATTR
|
||||
vQueueDelete( xQueueHandle xQueue )
|
||||
{
|
||||
xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
||||
|
||||
|
|
@ -1360,7 +1383,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
|
||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||
|
||||
unsigned char ucQueueGetQueueNumber( xQueueHandle xQueue )
|
||||
unsigned char ICACHE_FLASH_ATTR
|
||||
ucQueueGetQueueNumber( xQueueHandle xQueue )
|
||||
{
|
||||
return ( ( xQUEUE * ) xQueue )->ucQueueNumber;
|
||||
}
|
||||
|
|
@ -1370,7 +1394,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
|
||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||
|
||||
void vQueueSetQueueNumber( xQueueHandle xQueue, unsigned char ucQueueNumber )
|
||||
void ICACHE_FLASH_ATTR
|
||||
vQueueSetQueueNumber( xQueueHandle xQueue, unsigned char ucQueueNumber )
|
||||
{
|
||||
( ( xQUEUE * ) xQueue )->ucQueueNumber = ucQueueNumber;
|
||||
}
|
||||
|
|
@ -1380,7 +1405,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
|
||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||
|
||||
unsigned char ucQueueGetQueueType( xQueueHandle xQueue )
|
||||
unsigned char ICACHE_FLASH_ATTR
|
||||
ucQueueGetQueueType( xQueueHandle xQueue )
|
||||
{
|
||||
return ( ( xQUEUE * ) xQueue )->ucQueueType;
|
||||
}
|
||||
|
|
@ -1388,7 +1414,8 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
#endif /* configUSE_TRACE_FACILITY */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition )
|
||||
static void
|
||||
prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition )
|
||||
{
|
||||
if( pxQueue->uxItemSize == ( unsigned portBASE_TYPE ) 0 )
|
||||
{
|
||||
|
|
@ -1438,7 +1465,8 @@ static void prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, port
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCopyDataFromQueue( xQUEUE * const pxQueue, const void * const pvBuffer )
|
||||
static void
|
||||
prvCopyDataFromQueue( xQUEUE * const pxQueue, const void * const pvBuffer )
|
||||
{
|
||||
if( pxQueue->uxQueueType != queueQUEUE_IS_MUTEX )
|
||||
{
|
||||
|
|
@ -1452,7 +1480,8 @@ static void prvCopyDataFromQueue( xQUEUE * const pxQueue, const void * const pvB
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvUnlockQueue( xQUEUE *pxQueue )
|
||||
static void ICACHE_FLASH_ATTR
|
||||
prvUnlockQueue( xQUEUE *pxQueue )
|
||||
{
|
||||
/* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. */
|
||||
|
||||
|
|
@ -1551,7 +1580,8 @@ static void prvUnlockQueue( xQUEUE *pxQueue )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static signed portBASE_TYPE prvIsQueueEmpty( const xQUEUE *pxQueue )
|
||||
static signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
prvIsQueueEmpty( const xQUEUE *pxQueue )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
|
|
@ -1572,7 +1602,8 @@ signed portBASE_TYPE xReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle xQueue )
|
||||
signed portBASE_TYPE
|
||||
xQueueIsQueueEmptyFromISR( const xQueueHandle xQueue )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
|
|
@ -1590,7 +1621,8 @@ signed portBASE_TYPE xReturn;
|
|||
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static signed portBASE_TYPE prvIsQueueFull( const xQUEUE *pxQueue )
|
||||
static signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
prvIsQueueFull( const xQUEUE *pxQueue )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
|
|
@ -1611,7 +1643,8 @@ signed portBASE_TYPE xReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle xQueue )
|
||||
signed portBASE_TYPE
|
||||
xQueueIsQueueFullFromISR( const xQueueHandle xQueue )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
|
|
@ -1631,7 +1664,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_CO_ROUTINES == 1 )
|
||||
|
||||
signed portBASE_TYPE xQueueCRSend( xQueueHandle xQueue, const void *pvItemToQueue, portTickType xTicksToWait )
|
||||
signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueCRSend( xQueueHandle xQueue, const void *pvItemToQueue, portTickType xTicksToWait )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
||||
|
|
@ -1639,7 +1673,9 @@ signed portBASE_TYPE xReturn;
|
|||
/* If the queue is already full we may have to block. A critical section
|
||||
is required to prevent an interrupt removing something from the queue
|
||||
between the check to see if the queue is full and blocking on the queue. */
|
||||
portDISABLE_INTERRUPTS();
|
||||
|
||||
//portDISABLE_INTERRUPTS();
|
||||
PortDisableInt_NoNest();
|
||||
{
|
||||
if( prvIsQueueFull( pxQueue ) != pdFALSE )
|
||||
{
|
||||
|
|
@ -1650,19 +1686,23 @@ signed portBASE_TYPE xReturn;
|
|||
/* As this is called from a coroutine we cannot block directly, but
|
||||
return indicating that we need to block. */
|
||||
vCoRoutineAddToDelayedList( xTicksToWait, &( pxQueue->xTasksWaitingToSend ) );
|
||||
portENABLE_INTERRUPTS();
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
return errQUEUE_BLOCKED;
|
||||
}
|
||||
else
|
||||
{
|
||||
portENABLE_INTERRUPTS();
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
return errQUEUE_FULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
portENABLE_INTERRUPTS();
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
|
||||
portDISABLE_INTERRUPTS();
|
||||
//portDISABLE_INTERRUPTS();
|
||||
PortDisableInt_NoNest();
|
||||
{
|
||||
if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )
|
||||
{
|
||||
|
|
@ -1690,8 +1730,8 @@ signed portBASE_TYPE xReturn;
|
|||
xReturn = errQUEUE_FULL;
|
||||
}
|
||||
}
|
||||
portENABLE_INTERRUPTS();
|
||||
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
|
@ -1700,7 +1740,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_CO_ROUTINES == 1 )
|
||||
|
||||
signed portBASE_TYPE xQueueCRReceive( xQueueHandle xQueue, void *pvBuffer, portTickType xTicksToWait )
|
||||
signed portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueCRReceive( xQueueHandle xQueue, void *pvBuffer, portTickType xTicksToWait )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
||||
|
|
@ -1708,7 +1749,9 @@ signed portBASE_TYPE xReturn;
|
|||
/* If the queue is already empty we may have to block. A critical section
|
||||
is required to prevent an interrupt adding something to the queue
|
||||
between the check to see if the queue is empty and blocking on the queue. */
|
||||
portDISABLE_INTERRUPTS();
|
||||
|
||||
//portDISABLE_INTERRUPTS();
|
||||
PortDisableInt_NoNest();
|
||||
{
|
||||
if( pxQueue->uxMessagesWaiting == ( unsigned portBASE_TYPE ) 0 )
|
||||
{
|
||||
|
|
@ -1719,19 +1762,23 @@ signed portBASE_TYPE xReturn;
|
|||
/* As this is a co-routine we cannot block directly, but return
|
||||
indicating that we need to block. */
|
||||
vCoRoutineAddToDelayedList( xTicksToWait, &( pxQueue->xTasksWaitingToReceive ) );
|
||||
portENABLE_INTERRUPTS();
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
return errQUEUE_BLOCKED;
|
||||
}
|
||||
else
|
||||
{
|
||||
portENABLE_INTERRUPTS();
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
return errQUEUE_FULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
portENABLE_INTERRUPTS();
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
|
||||
portDISABLE_INTERRUPTS();
|
||||
//portDISABLE_INTERRUPTS();
|
||||
PortDisableInt_NoNest();
|
||||
{
|
||||
if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )
|
||||
{
|
||||
|
|
@ -1764,7 +1811,8 @@ signed portBASE_TYPE xReturn;
|
|||
xReturn = pdFAIL;
|
||||
}
|
||||
}
|
||||
portENABLE_INTERRUPTS();
|
||||
//portENABLE_INTERRUPTS();
|
||||
PortEnableInt_NoNest();
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
|
@ -1774,7 +1822,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_CO_ROUTINES == 1 )
|
||||
|
||||
signed portBASE_TYPE xQueueCRSendFromISR( xQueueHandle xQueue, const void *pvItemToQueue, signed portBASE_TYPE xCoRoutinePreviouslyWoken )
|
||||
signed portBASE_TYPE
|
||||
xQueueCRSendFromISR( xQueueHandle xQueue, const void *pvItemToQueue, signed portBASE_TYPE xCoRoutinePreviouslyWoken )
|
||||
{
|
||||
xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
||||
|
||||
|
|
@ -1806,7 +1855,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_CO_ROUTINES == 1 )
|
||||
|
||||
signed portBASE_TYPE xQueueCRReceiveFromISR( xQueueHandle xQueue, void *pvBuffer, signed portBASE_TYPE *pxCoRoutineWoken )
|
||||
signed portBASE_TYPE
|
||||
xQueueCRReceiveFromISR( xQueueHandle xQueue, void *pvBuffer, signed portBASE_TYPE *pxCoRoutineWoken )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
||||
|
|
@ -1850,7 +1900,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
||||
|
||||
void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcQueueName )
|
||||
void ICACHE_FLASH_ATTR
|
||||
vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcQueueName )
|
||||
{
|
||||
unsigned portBASE_TYPE ux;
|
||||
|
||||
|
|
@ -1873,7 +1924,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
||||
|
||||
void vQueueUnregisterQueue( xQueueHandle xQueue )
|
||||
void ICACHE_FLASH_ATTR
|
||||
vQueueUnregisterQueue( xQueueHandle xQueue )
|
||||
{
|
||||
unsigned portBASE_TYPE ux;
|
||||
|
||||
|
|
@ -1896,7 +1948,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_TIMERS == 1 )
|
||||
|
||||
void vQueueWaitForMessageRestricted( xQueueHandle xQueue, portTickType xTicksToWait )
|
||||
void ICACHE_FLASH_ATTR
|
||||
vQueueWaitForMessageRestricted( xQueueHandle xQueue, portTickType xTicksToWait )
|
||||
{
|
||||
xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
||||
|
||||
|
|
@ -1928,7 +1981,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
|
||||
xQueueSetHandle xQueueCreateSet( unsigned portBASE_TYPE uxEventQueueLength )
|
||||
xQueueSetHandle ICACHE_FLASH_ATTR
|
||||
xQueueCreateSet( unsigned portBASE_TYPE uxEventQueueLength )
|
||||
{
|
||||
xQueueSetHandle pxQueue;
|
||||
|
||||
|
|
@ -1942,7 +1996,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
|
||||
portBASE_TYPE xQueueAddToSet( xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet )
|
||||
portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueAddToSet( xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet )
|
||||
{
|
||||
portBASE_TYPE xReturn;
|
||||
|
||||
|
|
@ -1975,7 +2030,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
|
||||
portBASE_TYPE xQueueRemoveFromSet( xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet )
|
||||
portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
xQueueRemoveFromSet( xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet )
|
||||
{
|
||||
portBASE_TYPE xReturn;
|
||||
xQUEUE * const pxQueueOrSemaphore = ( xQUEUE * ) xQueueOrSemaphore;
|
||||
|
|
@ -2011,7 +2067,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
|
||||
xQueueSetMemberHandle xQueueSelectFromSet( xQueueSetHandle xQueueSet, portTickType xBlockTimeTicks )
|
||||
xQueueSetMemberHandle ICACHE_FLASH_ATTR
|
||||
xQueueSelectFromSet( xQueueSetHandle xQueueSet, portTickType xBlockTimeTicks )
|
||||
{
|
||||
xQueueSetMemberHandle xReturn = NULL;
|
||||
|
||||
|
|
@ -2024,7 +2081,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
|
||||
xQueueSetMemberHandle xQueueSelectFromSetFromISR( xQueueSetHandle xQueueSet )
|
||||
xQueueSetMemberHandle
|
||||
xQueueSelectFromSetFromISR( xQueueSetHandle xQueueSet )
|
||||
{
|
||||
xQueueSetMemberHandle xReturn = NULL;
|
||||
|
||||
|
|
@ -2037,7 +2095,8 @@ signed portBASE_TYPE xReturn;
|
|||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
|
||||
static portBASE_TYPE prvNotifyQueueSetContainer( const xQUEUE * const pxQueue, portBASE_TYPE xCopyPosition )
|
||||
static portBASE_TYPE ICACHE_FLASH_ATTR
|
||||
prvNotifyQueueSetContainer( const xQUEUE * const pxQueue, portBASE_TYPE xCopyPosition )
|
||||
{
|
||||
xQUEUE *pxQueueSetContainer = pxQueue->pxQueueSetContainer;
|
||||
portBASE_TYPE xReturn = pdFALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue