summaryrefslogtreecommitdiff
path: root/FreeRTOS/Demo/PIC18_MPLAB
diff options
context:
space:
mode:
Diffstat (limited to 'FreeRTOS/Demo/PIC18_MPLAB')
-rw-r--r--FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h2
-rw-r--r--FreeRTOS/Demo/PIC18_MPLAB/main1.c10
-rw-r--r--FreeRTOS/Demo/PIC18_MPLAB/main2.c4
-rw-r--r--FreeRTOS/Demo/PIC18_MPLAB/main3.c10
-rw-r--r--FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c10
5 files changed, 18 insertions, 18 deletions
diff --git a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h
index 4db5509a5..b0a462fd5 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h
@@ -83,7 +83,7 @@
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configMAX_PRIORITIES ( 4 )
#define configMINIMAL_STACK_SIZE ( 105 )
diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main1.c b/FreeRTOS/Demo/PIC18_MPLAB/main1.c
index d422b3434..6bebf1c7e 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/main1.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/main1.c
@@ -101,7 +101,7 @@
Changes from V2.0.0
+ Delay periods are now specified using variables and constants of
- portTickType rather than unsigned long.
+ TickType_t rather than unsigned long.
*/
/* Scheduler include files. */
@@ -117,8 +117,8 @@ Changes from V2.0.0
/* The period between executions of the check task before and after an error
has been discovered. If an error has been discovered the check task runs
more frequently - increasing the LED flash rate. */
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 100 / portTICK_RATE_MS )
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 100 / portTICK_PERIOD_MS )
/* Priority definitions for some of the tasks. Other tasks just use the idle
priority. */
@@ -131,7 +131,7 @@ priority. */
/* Constants required for the communications. Only one character is ever
transmitted. */
#define mainCOMMS_QUEUE_LENGTH ( 5 )
-#define mainNO_BLOCK ( ( portTickType ) 0 )
+#define mainNO_BLOCK ( ( TickType_t ) 0 )
#define mainBAUD_RATE ( ( unsigned long ) 9600 )
/*
@@ -172,7 +172,7 @@ void main( void )
static void vErrorChecks( void *pvParameters )
{
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;
portBASE_TYPE xErrorOccurred;
/* Cycle for ever, delaying then checking all the other tasks are still
diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main2.c b/FreeRTOS/Demo/PIC18_MPLAB/main2.c
index 8c47be253..3fae592ca 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/main2.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/main2.c
@@ -97,7 +97,7 @@
Changes from V2.0.0
+ Delay periods are now specified using variables and constants of
- portTickType rather than unsigned long.
+ TickType_t rather than unsigned long.
*/
/* Scheduler include files. */
@@ -119,7 +119,7 @@ priority. */
/* Constants required for the communications. Only one character is ever
transmitted. */
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portBASE_TYPE ) 5 )
-#define mainNO_BLOCK ( ( portTickType ) 0 )
+#define mainNO_BLOCK ( ( TickType_t ) 0 )
#define mainBAUD_RATE ( ( unsigned long ) 9600 )
/*
diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main3.c b/FreeRTOS/Demo/PIC18_MPLAB/main3.c
index c8e01c5b2..f0c6afb4c 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/main3.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/main3.c
@@ -105,7 +105,7 @@
Changes from V2.0.0
+ Delay periods are now specified using variables and constants of
- portTickType rather than unsigned long.
+ TickType_t rather than unsigned long.
*/
/* Scheduler include files. */
@@ -126,11 +126,11 @@ priority. */
/* The period between executions of the check task before and after an error
has been discovered. If an error has been discovered the check task runs
more frequently - increasing the LED flash rate. */
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 100 / portTICK_RATE_MS )
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 100 / portTICK_PERIOD_MS )
/* The period for which mainRESET_LED remain on every reset. */
-#define mainRESET_LED_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
+#define mainRESET_LED_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )
/* The LED that is toggled whenever a character is transmitted.
mainCOMM_TX_RX_LED + 1 will be toggled every time a character is received. */
@@ -182,7 +182,7 @@ void main( void )
static void vErrorChecks( void *pvParameters )
{
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;
volatile unsigned long ulDummy = 3UL;
/* Toggle the LED so we can see when a reset occurs. */
diff --git a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c
index d0786ccd1..38fa15717 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c
@@ -71,7 +71,7 @@ Changes from V1.2.5
Changes from V2.0.0
- + Use portTickType in place of unsigned pdLONG for delay periods.
+ + Use TickType_t in place of unsigned pdLONG for delay periods.
+ cQueueReieveFromISR() used in place of xQueueReceive() in ISR.
*/
@@ -112,8 +112,8 @@ void vSerialRxISR( void );
/*-----------------------------------------------------------*/
/* Queues to interface between comms API and interrupt routines. */
-static xQueueHandle xRxedChars;
-static xQueueHandle xCharsForTx;
+static QueueHandle_t xRxedChars;
+static QueueHandle_t xCharsForTx;
/*-----------------------------------------------------------*/
@@ -177,7 +177,7 @@ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWant
}
/*-----------------------------------------------------------*/
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
{
/* Get the next character from the buffer. Return false if no characters
are available, or arrive before xBlockTime expires. */
@@ -192,7 +192,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, po
}
/*-----------------------------------------------------------*/
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )
{
/* Return false if after the block time there is no room on the Tx queue. */
if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != pdPASS )