Skip to content

Commit 91c20f5

Browse files
authored
Added support of 64bit events. (#597)
* Added support of 64bit even Signed-off-by: Cervenka Dusan <[email protected]> * Added missing brackets Signed-off-by: Cervenka Dusan <[email protected]> * Made proper name for tick macro. Signed-off-by: Cervenka Dusan <[email protected]> * Improved macro evaluation Signed-off-by: Cervenka Dusan <[email protected]> * Fixed missed port files + documentation Signed-off-by: Cervenka Dusan <[email protected]> * Changes made on PR Signed-off-by: Cervenka Dusan <[email protected]> * Fix macro definition. Signed-off-by: Cervenka Dusan <[email protected]> * Formatted code with uncrustify Signed-off-by: Cervenka Dusan <[email protected]> --------- Signed-off-by: Cervenka Dusan <[email protected]>
1 parent 260a37c commit 91c20f5

File tree

124 files changed

+588
-313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+588
-313
lines changed

event_groups.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,22 @@
4949
/* The following bit fields convey control information in a task's event list
5050
* item value. It is important they don't clash with the
5151
* taskEVENT_LIST_ITEM_VALUE_IN_USE definition. */
52-
#if configUSE_16_BIT_TICKS == 1
52+
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
5353
#define eventCLEAR_EVENTS_ON_EXIT_BIT 0x0100U
5454
#define eventUNBLOCKED_DUE_TO_BIT_SET 0x0200U
5555
#define eventWAIT_FOR_ALL_BITS 0x0400U
5656
#define eventEVENT_BITS_CONTROL_BYTES 0xff00U
57-
#else
57+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
5858
#define eventCLEAR_EVENTS_ON_EXIT_BIT 0x01000000UL
5959
#define eventUNBLOCKED_DUE_TO_BIT_SET 0x02000000UL
6060
#define eventWAIT_FOR_ALL_BITS 0x04000000UL
6161
#define eventEVENT_BITS_CONTROL_BYTES 0xff000000UL
62-
#endif
62+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS )
63+
#define eventCLEAR_EVENTS_ON_EXIT_BIT 0x0100000000000000ULL
64+
#define eventUNBLOCKED_DUE_TO_BIT_SET 0x0200000000000000ULL
65+
#define eventWAIT_FOR_ALL_BITS 0x0400000000000000ULL
66+
#define eventEVENT_BITS_CONTROL_BYTES 0xff00000000000000ULL
67+
#endif /* if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS ) */
6368

6469
typedef struct EventGroupDef_t
6570
{

include/FreeRTOS.h

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
#endif
5656
/* *INDENT-ON* */
5757

58+
/* Acceptable values for configTICK_TYPE_WIDTH_IN_BITS. */
59+
#define TICK_TYPE_WIDTH_16_BITS 0
60+
#define TICK_TYPE_WIDTH_32_BITS 1
61+
#define TICK_TYPE_WIDTH_64_BITS 2
62+
5863
/* Application specific configuration options. */
5964
#include "FreeRTOSConfig.h"
6065

@@ -155,8 +160,28 @@
155160
#error Missing definition: configUSE_TICK_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
156161
#endif
157162

158-
#ifndef configUSE_16_BIT_TICKS
159-
#error Missing definition: configUSE_16_BIT_TICKS must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
163+
#if !defined( configUSE_16_BIT_TICKS ) && !defined( configTICK_TYPE_WIDTH_IN_BITS )
164+
#error Missing definition: One of configUSE_16_BIT_TICKS and configTICK_TYPE_WIDTH_IN_BITS must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
165+
#endif
166+
167+
#if defined( configUSE_16_BIT_TICKS ) && defined( configTICK_TYPE_WIDTH_IN_BITS )
168+
#error Only one of configUSE_16_BIT_TICKS and configTICK_TYPE_WIDTH_IN_BITS must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
169+
#endif
170+
171+
/* Define configTICK_TYPE_WIDTH_IN_BITS according to the
172+
* value of configUSE_16_BIT_TICKS for backward compatibility. */
173+
#ifndef configTICK_TYPE_WIDTH_IN_BITS
174+
#if ( configUSE_16_BIT_TICKS == 1 )
175+
#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_16_BITS
176+
#else
177+
#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_32_BITS
178+
#endif
179+
#endif
180+
181+
#if ( ( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_16_BITS ) && \
182+
( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_32_BITS ) && \
183+
( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_64_BITS ) )
184+
#error Macro configTICK_TYPE_WIDTH_IN_BITS is defined to incorrect value. See the Configuration section of the FreeRTOS API documentation for details.
160185
#endif
161186

162187
#ifndef INCLUDE_vTaskPrioritySet

include/event_groups.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ typedef struct EventGroupDef_t * EventGroupHandle_t;
8484

8585
/*
8686
* The type that holds event bits always matches TickType_t - therefore the
87-
* number of bits it holds is set by configUSE_16_BIT_TICKS (16 bits if set to 1,
88-
* 32 bits if set to 0.
87+
* number of bits it holds is set by configTICK_TYPE_WIDTH_IN_BITS (16 bits if set to 0,
88+
* 32 bits if set to 1, 64 bits if set to 2.
8989
*
9090
* \defgroup EventBits_t EventBits_t
9191
* \ingroup EventGroup
@@ -112,11 +112,12 @@ typedef TickType_t EventBits_t;
112112
*
113113
* Although event groups are not related to ticks, for internal implementation
114114
* reasons the number of bits available for use in an event group is dependent
115-
* on the configUSE_16_BIT_TICKS setting in FreeRTOSConfig.h. If
116-
* configUSE_16_BIT_TICKS is 1 then each event group contains 8 usable bits (bit
117-
* 0 to bit 7). If configUSE_16_BIT_TICKS is set to 0 then each event group has
118-
* 24 usable bits (bit 0 to bit 23). The EventBits_t type is used to store
119-
* event bits within an event group.
115+
* on the configTICK_TYPE_WIDTH_IN_BITS setting in FreeRTOSConfig.h. If
116+
* configTICK_TYPE_WIDTH_IN_BITS is 0 then each event group contains 8 usable bits (bit
117+
* 0 to bit 7). If configTICK_TYPE_WIDTH_IN_BITS is set to 1 then each event group has
118+
* 24 usable bits (bit 0 to bit 23). If configTICK_TYPE_WIDTH_IN_BITS is set to 2 then
119+
* each event group has 56 usable bits (bit 0 to bit 53). The EventBits_t type
120+
* is used to store event bits within an event group.
120121
*
121122
* @return If the event group was created then a handle to the event group is
122123
* returned. If there was insufficient FreeRTOS heap available to create the
@@ -168,11 +169,12 @@ typedef TickType_t EventBits_t;
168169
*
169170
* Although event groups are not related to ticks, for internal implementation
170171
* reasons the number of bits available for use in an event group is dependent
171-
* on the configUSE_16_BIT_TICKS setting in FreeRTOSConfig.h. If
172-
* configUSE_16_BIT_TICKS is 1 then each event group contains 8 usable bits (bit
173-
* 0 to bit 7). If configUSE_16_BIT_TICKS is set to 0 then each event group has
174-
* 24 usable bits (bit 0 to bit 23). The EventBits_t type is used to store
175-
* event bits within an event group.
172+
* on the configTICK_TYPE_WIDTH_IN_BITS setting in FreeRTOSConfig.h. If
173+
* configTICK_TYPE_WIDTH_IN_BITS is 0 then each event group contains 8 usable bits (bit
174+
* 0 to bit 7). If configTICK_TYPE_WIDTH_IN_BITS is set to 1 then each event group has
175+
* 24 usable bits (bit 0 to bit 23). If configTICK_TYPE_WIDTH_IN_BITS is set to 2 then
176+
* each event group has 56 usable bits (bit 0 to bit 53). The EventBits_t type
177+
* is used to store event bits within an event group.
176178
*
177179
* @param pxEventGroupBuffer pxEventGroupBuffer must point to a variable of type
178180
* StaticEventGroup_t, which will be then be used to hold the event group's data

include/projdefs.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,14 @@ typedef void (* TaskFunction_t)( void * );
6060
#define configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES 0
6161
#endif
6262

63-
#if ( configUSE_16_BIT_TICKS == 1 )
63+
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6464
#define pdINTEGRITY_CHECK_VALUE 0x5a5a
65-
#else
65+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6666
#define pdINTEGRITY_CHECK_VALUE 0x5a5a5a5aUL
67+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS )
68+
#define pdINTEGRITY_CHECK_VALUE 0x5a5a5a5a5a5a5a5aULL
69+
#else
70+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6771
#endif
6872

6973
/* The following errno values are used by FreeRTOS+ components, not FreeRTOS

portable/ARMv8M/non_secure/portmacrocommon.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,18 @@
7272
typedef long BaseType_t;
7373
typedef unsigned long UBaseType_t;
7474

75-
#if ( configUSE_16_BIT_TICKS == 1 )
75+
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
7676
typedef uint16_t TickType_t;
7777
#define portMAX_DELAY ( TickType_t ) 0xffff
78-
#else
78+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
7979
typedef uint32_t TickType_t;
8080
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
8181

8282
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
8383
* not need to be guarded with a critical section. */
8484
#define portTICK_TYPE_IS_ATOMIC 1
85+
#else
86+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
8587
#endif
8688
/*-----------------------------------------------------------*/
8789

portable/BCC/16BitDOS/Flsh186/prtmacro.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ typedef portSTACK_TYPE StackType_t;
5252
typedef short BaseType_t;
5353
typedef unsigned short UBaseType_t;
5454

55-
#if( configUSE_16_BIT_TICKS == 1 )
55+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
5656
typedef uint16_t TickType_t;
5757
#define portMAX_DELAY ( TickType_t ) 0xffff
58-
#else
58+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
5959
typedef uint32_t TickType_t;
6060
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
61+
#else
62+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6163
#endif
6264
/*-----------------------------------------------------------*/
6365

portable/BCC/16BitDOS/PC/prtmacro.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ typedef portSTACK_TYPE StackType_t;
5252
typedef short BaseType_t;
5353
typedef unsigned short UBaseType_t;
5454

55-
#if( configUSE_16_BIT_TICKS == 1 )
55+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
5656
typedef uint16_t TickType_t;
5757
#define portMAX_DELAY ( TickType_t ) 0xffff
58-
#else
58+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
5959
typedef uint32_t TickType_t;
6060
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
61+
#else
62+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6163
#endif
6264
/*-----------------------------------------------------------*/
6365

portable/CCS/ARM_CM3/portmacro.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,18 @@
5757
typedef long BaseType_t;
5858
typedef unsigned long UBaseType_t;
5959

60-
#if ( configUSE_16_BIT_TICKS == 1 )
60+
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6161
typedef uint16_t TickType_t;
6262
#define portMAX_DELAY ( TickType_t ) 0xffff
63-
#else
63+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6464
typedef uint32_t TickType_t;
6565
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
6666

6767
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
6868
* not need to be guarded with a critical section. */
6969
#define portTICK_TYPE_IS_ATOMIC 1
70+
#else
71+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
7072
#endif
7173
/*-----------------------------------------------------------*/
7274

portable/CCS/ARM_CM4F/portmacro.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,18 @@
5757
typedef long BaseType_t;
5858
typedef unsigned long UBaseType_t;
5959

60-
#if ( configUSE_16_BIT_TICKS == 1 )
60+
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6161
typedef uint16_t TickType_t;
6262
#define portMAX_DELAY ( TickType_t ) 0xffff
63-
#else
63+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6464
typedef uint32_t TickType_t;
6565
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
6666

6767
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
6868
* not need to be guarded with a critical section. */
6969
#define portTICK_TYPE_IS_ATOMIC 1
70+
#else
71+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
7072
#endif
7173
/*-----------------------------------------------------------*/
7274

portable/CCS/ARM_Cortex-R4/portmacro.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,18 @@ typedef portSTACK_TYPE StackType_t;
5252
typedef long BaseType_t;
5353
typedef unsigned long UBaseType_t;
5454

55-
#if (configUSE_16_BIT_TICKS == 1)
55+
#if (configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS)
5656
typedef uint16_t TickType_t;
5757
#define portMAX_DELAY (TickType_t) 0xFFFF
58-
#else
58+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
5959
typedef uint32_t TickType_t;
6060
#define portMAX_DELAY (TickType_t) 0xFFFFFFFFF
6161

6262
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
6363
not need to be guarded with a critical section. */
6464
#define portTICK_TYPE_IS_ATOMIC 1
65+
#else
66+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6567
#endif
6668

6769

portable/CCS/MSP430X/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ typedef portSTACK_TYPE StackType_t;
6262
typedef short BaseType_t;
6363
typedef unsigned short UBaseType_t;
6464

65-
#if( configUSE_16_BIT_TICKS == 1 )
65+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6666
typedef uint16_t TickType_t;
6767
#define portMAX_DELAY ( TickType_t ) 0xffff
68-
#else
68+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6969
typedef uint32_t TickType_t;
70-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
70+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
71+
#else
72+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
7173
#endif
7274

7375
/*-----------------------------------------------------------*/

portable/CodeWarrior/ColdFire_V1/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ typedef long BaseType_t;
5757
typedef unsigned long UBaseType_t;
5858

5959

60-
#if( configUSE_16_BIT_TICKS == 1 )
60+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6161
typedef uint16_t TickType_t;
6262
#define portMAX_DELAY ( TickType_t ) 0xffff
63-
#else
63+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6464
typedef uint32_t TickType_t;
65-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
65+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
66+
#else
67+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6668
#endif
6769
/*-----------------------------------------------------------*/
6870

portable/CodeWarrior/ColdFire_V2/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ typedef portSTACK_TYPE StackType_t;
5656
typedef long BaseType_t;
5757
typedef unsigned long UBaseType_t;
5858

59-
#if( configUSE_16_BIT_TICKS == 1 )
59+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6060
typedef uint16_t TickType_t;
6161
#define portMAX_DELAY ( TickType_t ) 0xffff
62-
#else
62+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6363
typedef uint32_t TickType_t;
64-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
64+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
65+
#else
66+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6567
#endif
6668
/*-----------------------------------------------------------*/
6769

portable/CodeWarrior/HCS12/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ typedef portSTACK_TYPE StackType_t;
5353
typedef signed char BaseType_t;
5454
typedef unsigned char UBaseType_t;
5555

56-
#if( configUSE_16_BIT_TICKS == 1 )
56+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
5757
typedef uint16_t TickType_t;
5858
#define portMAX_DELAY ( TickType_t ) 0xffff
59-
#else
59+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6060
typedef uint32_t TickType_t;
61-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
61+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
62+
#else
63+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6264
#endif
6365
/*-----------------------------------------------------------*/
6466

portable/GCC/ARM7_AT91FR40008/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ typedef portSTACK_TYPE StackType_t;
7979
typedef long BaseType_t;
8080
typedef unsigned long UBaseType_t;
8181

82-
#if( configUSE_16_BIT_TICKS == 1 )
82+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
8383
typedef uint16_t TickType_t;
8484
#define portMAX_DELAY ( TickType_t ) 0xffff
85-
#else
85+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
8686
typedef uint32_t TickType_t;
87-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
87+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
88+
#else
89+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
8890
#endif
8991
/*-----------------------------------------------------------*/
9092

portable/GCC/ARM7_AT91SAM7S/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ typedef portSTACK_TYPE StackType_t;
7979
typedef long BaseType_t;
8080
typedef unsigned long UBaseType_t;
8181

82-
#if( configUSE_16_BIT_TICKS == 1 )
82+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
8383
typedef uint16_t TickType_t;
8484
#define portMAX_DELAY ( TickType_t ) 0xffff
85-
#else
85+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
8686
typedef uint32_t TickType_t;
87-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
87+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
88+
#else
89+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
8890
#endif
8991
/*-----------------------------------------------------------*/
9092

portable/GCC/ARM7_LPC2000/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ typedef portSTACK_TYPE StackType_t;
5656
typedef long BaseType_t;
5757
typedef unsigned long UBaseType_t;
5858

59-
#if( configUSE_16_BIT_TICKS == 1 )
59+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6060
typedef uint16_t TickType_t;
6161
#define portMAX_DELAY ( TickType_t ) 0xffff
62-
#else
62+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6363
typedef uint32_t TickType_t;
64-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
64+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
65+
#else
66+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6567
#endif
6668
/*-----------------------------------------------------------*/
6769

portable/GCC/ARM7_LPC23xx/portmacro.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ typedef portSTACK_TYPE StackType_t;
7979
typedef long BaseType_t;
8080
typedef unsigned long UBaseType_t;
8181

82-
#if( configUSE_16_BIT_TICKS == 1 )
82+
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
8383
typedef uint16_t TickType_t;
8484
#define portMAX_DELAY ( TickType_t ) 0xffff
85-
#else
85+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
8686
typedef uint32_t TickType_t;
87-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
87+
#define portMAX_DELAY ( TickType_t ) ( 0xFFFFFFFFUL )
88+
#else
89+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
8890
#endif
8991
/*-----------------------------------------------------------*/
9092

0 commit comments

Comments
 (0)