mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Update the demo directory to use the version 8 type naming conventions.
This commit is contained in:
parent
c6d8892b0d
commit
5a2a8fc319
639 changed files with 3127 additions and 3470 deletions
|
@ -109,7 +109,7 @@ static const uint32_t ulReloadValueForOneTick = ( ( lpCLOCK_INPUT_FREQUENCY / co
|
|||
/* Holds the maximum number of ticks that can be suppressed - which is
|
||||
basically how far into the future an interrupt can be generated. Set during
|
||||
initialisation. */
|
||||
static portTickType xMaximumPossibleSuppressedTicks = 0;
|
||||
static TickType_t xMaximumPossibleSuppressedTicks = 0;
|
||||
|
||||
/* Flag set from the tick interrupt to allow the sleep processing to know if
|
||||
sleep mode was exited because of an tick interrupt or a different interrupt. */
|
||||
|
@ -195,12 +195,12 @@ TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
|
|||
/* Override the default definition of vPortSuppressTicksAndSleep() that is
|
||||
weakly defined in the FreeRTOS Cortex-M3 port layer with a version that manages
|
||||
the TIM2 interrupt, as the tick is generated from TIM2 compare matches events. */
|
||||
void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime )
|
||||
void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
|
||||
{
|
||||
uint32_t ulCounterValue, ulCompleteTickPeriods;
|
||||
eSleepModeStatus eSleepAction;
|
||||
portTickType xModifiableIdleTime;
|
||||
const portTickType xRegulatorOffIdleTime = 30;
|
||||
TickType_t xModifiableIdleTime;
|
||||
const TickType_t xRegulatorOffIdleTime = 30;
|
||||
|
||||
/* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */
|
||||
|
||||
|
|
|
@ -94,11 +94,11 @@ demo, or 0 to run the more comprehensive test and demo application. */
|
|||
/* A few settings are dependent on the configCREATE_LOW_POWER_DEMO setting. */
|
||||
#if configCREATE_LOW_POWER_DEMO == 1
|
||||
#define configTICK_RATE_HZ ( 100 )
|
||||
#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP ( 20 + 1 ) /* ( ( 200 / portTICK_RATE_MS ) + 1 ) written out pre-processed to enable #error statements to check its value. */
|
||||
#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP ( 20 + 1 ) /* ( ( 200 / portTICK_PERIOD_MS ) + 1 ) written out pre-processed to enable #error statements to check its value. */
|
||||
#define configUSE_TIMERS 0
|
||||
#else
|
||||
#define configSYSTICK_CLOCK_HZ ( SystemCoreClock >> 3UL ) /* Systick clock is one eighth the system clock. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
||||
#define configUSE_TIMERS 1
|
||||
#endif /* configCREATE_LOW_POWER_DEMO */
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ extern void main_full( void );
|
|||
within this file. */
|
||||
void vApplicationMallocFailedHook( void );
|
||||
void vApplicationIdleHook( void );
|
||||
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );
|
||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
|
||||
void vApplicationTickHook( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -234,7 +234,7 @@ void vApplicationIdleHook( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
|
||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
|
||||
{
|
||||
( void ) pcTaskName;
|
||||
( void ) pxTask;
|
||||
|
|
|
@ -134,20 +134,20 @@
|
|||
|
||||
/* The period after which the check timer will expire providing no errors
|
||||
have been reported by any of the standard demo tasks. ms are converted to the
|
||||
equivalent in ticks using the portTICK_RATE_MS constant. */
|
||||
#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )
|
||||
equivalent in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )
|
||||
|
||||
/* The period at which the check timer will expire, in ms, if an error has been
|
||||
reported in one of the standard demo tasks. ms are converted to the equivalent
|
||||
in ticks using the portTICK_RATE_MS constant. */
|
||||
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )
|
||||
in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The check timer callback function, as described at the top of this file.
|
||||
*/
|
||||
static void prvCheckTimerCallback( xTimerHandle xTimer );
|
||||
static void prvCheckTimerCallback( TimerHandle_t xTimer );
|
||||
|
||||
/*
|
||||
* Configure the LCD, then write welcome message.
|
||||
|
@ -158,7 +158,7 @@ static void prvConfigureLCD( void );
|
|||
|
||||
void main_full( void )
|
||||
{
|
||||
xTimerHandle xCheckTimer = NULL;
|
||||
TimerHandle_t xCheckTimer = NULL;
|
||||
|
||||
/* The LCD is only used in the Full demo. */
|
||||
prvConfigureLCD();
|
||||
|
@ -201,7 +201,7 @@ xTimerHandle xCheckTimer = NULL;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCheckTimerCallback( xTimerHandle xTimer )
|
||||
static void prvCheckTimerCallback( TimerHandle_t xTimer )
|
||||
{
|
||||
static long lChangedTimerPeriodAlready = pdFALSE;
|
||||
unsigned long ulErrorFound = pdFALSE;
|
||||
|
|
|
@ -174,7 +174,7 @@ empty. */
|
|||
#define mainQUEUED_VALUE ( 100UL )
|
||||
|
||||
/* The length of time the LED will remain on for. */
|
||||
#define mainLED_TOGGLE_DELAY ( 10 / portTICK_RATE_MS )
|
||||
#define mainLED_TOGGLE_DELAY ( 10 / portTICK_PERIOD_MS )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -187,19 +187,19 @@ static void prvQueueSendTask( void *pvParameters );
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The queue used to pass data from the Tx task to the Rx task. */
|
||||
static xQueueHandle xQueue = NULL;
|
||||
static QueueHandle_t xQueue = NULL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Holds the block time used by the Tx task. */
|
||||
portTickType xSendBlockTime = ( 100UL / portTICK_RATE_MS );
|
||||
TickType_t xSendBlockTime = ( 100UL / portTICK_PERIOD_MS );
|
||||
|
||||
/* The lower an upper limits of the block time. An infinite block time is used
|
||||
if xSendBlockTime is incremented past xMaxBlockTime. */
|
||||
static const portTickType xMaxBlockTime = ( 500L / portTICK_RATE_MS ), xMinBlockTime = ( 100L / portTICK_RATE_MS );
|
||||
static const TickType_t xMaxBlockTime = ( 500L / portTICK_PERIOD_MS ), xMinBlockTime = ( 100L / portTICK_PERIOD_MS );
|
||||
|
||||
/* The semaphore on which the Tx task blocks. */
|
||||
static xSemaphoreHandle xTxSemaphore = NULL;
|
||||
static SemaphoreHandle_t xTxSemaphore = NULL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -281,7 +281,7 @@ unsigned long ulReceivedValue;
|
|||
/* Handles interrupts generated by pressing the USER button. */
|
||||
void EXTI0_IRQHandler(void)
|
||||
{
|
||||
static const portTickType xIncrement = 200UL / portTICK_RATE_MS;
|
||||
static const TickType_t xIncrement = 200UL / portTICK_PERIOD_MS;
|
||||
|
||||
/* If xSendBlockTime is already portMAX_DELAY then the Tx task was blocked
|
||||
indefinitely, and this interrupt is bringing the MCU out of STOP low power
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue