Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FreeRTOS/Demo/Common/Minimal/StreamBufferDemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static void prvSingleTaskTests( StreamBufferHandle_t xStreamBuffer )
/* Ensure data was written as expected even when there was an attempt to
* write more than was available. This also tries to read more bytes than are
* available. */
xReturned = xStreamBufferReceive( xStreamBuffer, ( void * ) pucFullBuffer, xFullBufferSize, xMinimalBlockTime );
xStreamBufferReceive( xStreamBuffer, ( void * ) pucFullBuffer, xFullBufferSize, xMinimalBlockTime );
prvCheckExpectedState( memcmp( ( const void * ) pucFullBuffer, ( const void * ) pc54ByteString, sbSTREAM_BUFFER_LENGTH_BYTES ) == 0 );
prvCheckExpectedState( xStreamBufferIsFull( xStreamBuffer ) == pdFALSE );
prvCheckExpectedState( xStreamBufferIsEmpty( xStreamBuffer ) == pdTRUE );
Expand Down
1 change: 1 addition & 0 deletions FreeRTOS/Demo/Common/Minimal/TaskNotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ static void prvSingleTaskTests( void )
configASSERT( xReturned == pdPASS );
( void ) xReturned; /* In case configASSERT() is not defined. */
xReturned = xTaskNotifyWait( notifyUINT32_MAX, 0, &ulNotifiedValue, 0 );
configASSERT( xReturned == pdPASS );
configASSERT( ulNotifiedValue == ulSecondNotifiedValueConst );
( void ) ulNotifiedValue; /* In case configASSERT() is not defined. */

Expand Down
18 changes: 10 additions & 8 deletions FreeRTOS/Demo/Common/Minimal/TimerDemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ static void prvTimerTestTask( void * pvParameters )
BaseType_t xAreTimerDemoTasksStillRunning( TickType_t xCycleFrequency )
{
static uint32_t ulLastLoopCounter = 0UL;
TickType_t xMaxBlockTimeUsedByTheseTests, xLoopCounterIncrementTimeMax;
static TickType_t xIterationsWithoutCounterIncrement = ( TickType_t ) 0, xLastCycleFrequency;
TickType_t xMaxBlockTimeUsedByTheseTests, xLoopCounterIncrementTimeMax;

configASSERT( xCycleFrequency != 0UL );

if( xLastCycleFrequency != xCycleFrequency )
{
Expand All @@ -241,17 +243,17 @@ BaseType_t xAreTimerDemoTasksStillRunning( TickType_t xCycleFrequency )
xLastCycleFrequency = xCycleFrequency;
}

/* Calculate the maximum number of times that it is permissible for this
* function to be called without ulLoopCounter being incremented. This is
* necessary because the tests in this file block for extended periods, and the
* block period might be longer than the time between calls to this function. */
xMaxBlockTimeUsedByTheseTests = ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod;
xLoopCounterIncrementTimeMax = ( xMaxBlockTimeUsedByTheseTests / xCycleFrequency ) + 1;

/* If the demo task is still running then the loop counter is expected to
* have incremented every xLoopCounterIncrementTimeMax calls. */
if( ulLastLoopCounter == ulLoopCounter )
{
/* Calculate the maximum number of times that it is permissible for this
* function to be called without ulLoopCounter being incremented. This is
* necessary because the tests in this file block for extended periods, and the
* block period might be longer than the time between calls to this function. */
xMaxBlockTimeUsedByTheseTests = ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod;
xLoopCounterIncrementTimeMax = ( xMaxBlockTimeUsedByTheseTests / xCycleFrequency ) + 1;

xIterationsWithoutCounterIncrement++;

if( xIterationsWithoutCounterIncrement > xLoopCounterIncrementTimeMax )
Expand Down
Loading