Skip to content

Commit b459456

Browse files
committed
Changes made on PR
Signed-off-by: Cervenka Dusan <[email protected]>
1 parent 2abd3ff commit b459456

File tree

124 files changed

+582
-354
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

+582
-354
lines changed

event_groups.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@
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 ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16 )
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_64 )
62+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS )
6363
#define eventCLEAR_EVENTS_ON_EXIT_BIT 0x0100000000000000ULL
6464
#define eventUNBLOCKED_DUE_TO_BIT_SET 0x0200000000000000ULL
6565
#define eventWAIT_FOR_ALL_BITS 0x0400000000000000ULL

include/FreeRTOS.h

Lines changed: 20 additions & 28 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,41 +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-
#ifdef configUSE_16_BIT_TICKS
159-
#error configUSE_16_BIT_TICKS is deprecated and replaced with configTICK_BIT_WIDTH. 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.
160165
#endif
161166

162-
#ifndef TICK_BIT_WIDTH_16
163-
#define TICK_BIT_WIDTH_16 0
164-
#else
165-
#if TICK_BIT_WIDTH_16 != 0
166-
#error TICK_BIT_WIDTH_16 has expected value 0!
167-
#endif
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.
168169
#endif
169170

170-
#ifndef TICK_BIT_WIDTH_32
171-
#define TICK_BIT_WIDTH_32 1
172-
#else
173-
#if TICK_BIT_WIDTH_32 != 1
174-
#error TICK_BIT_WIDTH_32 has expected value 1!
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
175178
#endif
176179
#endif
177180

178-
#ifndef TICK_BIT_WIDTH_64
179-
#define TICK_BIT_WIDTH_64 2
180-
#else
181-
#if TICK_BIT_WIDTH_64 != 2
182-
#error TICK_BIT_WIDTH_64 has expected value 2!
183-
#endif
184-
#endif
185-
186-
#ifndef configTICK_BIT_WIDTH
187-
#error Missing definition: configTICK_BIT_WIDTH must be defined in FreeRTOSConfig.h as either 0 (16 bit), 1 (32 bit) or 2 (64 bit). See the Configuration section of the FreeRTOS API documentation for details.
188-
#elif configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16
189-
#elif configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32
190-
#elif configTICK_BIT_WIDTH == TICK_BIT_WIDTH_64
191-
#else
192-
#error Macro configTICK_BIT_WIDTH contains wrong value. See the Configuration section of the FreeRTOS API documentation for details.
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.
193185
#endif
194186

195187
#ifndef INCLUDE_vTaskPrioritySet

include/event_groups.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ 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 configTICK_BIT_WIDTH (16 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,
8888
* 32 bits if set to 1, 64 bits if set to 2.
8989
*
9090
* \defgroup EventBits_t EventBits_t
@@ -112,10 +112,10 @@ 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 configTICK_BIT_WIDTH setting in FreeRTOSConfig.h. If
116-
* configTICK_BIT_WIDTH is 0 then each event group contains 8 usable bits (bit
117-
* 0 to bit 7). If configTICK_BIT_WIDTH is set to 1 then each event group has
118-
* 24 usable bits (bit 0 to bit 23). If configTICK_BIT_WIDTH is set to 2 then
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
119119
* each event group has 56 usable bits (bit 0 to bit 53). The EventBits_t type
120120
* is used to store event bits within an event group.
121121
*
@@ -169,10 +169,10 @@ typedef TickType_t EventBits_t;
169169
*
170170
* Although event groups are not related to ticks, for internal implementation
171171
* reasons the number of bits available for use in an event group is dependent
172-
* on the configTICK_BIT_WIDTH setting in FreeRTOSConfig.h. If
173-
* configTICK_BIT_WIDTH is 0 then each event group contains 8 usable bits (bit
174-
* 0 to bit 7). If configTICK_BIT_WIDTH is set to 1 then each event group has
175-
* 24 usable bits (bit 0 to bit 23). If configTICK_BIT_WIDTH is set to 2 then
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
176176
* each event group has 56 usable bits (bit 0 to bit 53). The EventBits_t type
177177
* is used to store event bits within an event group.
178178
*

include/projdefs.h

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

63-
#if ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16 )
63+
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
6464
#define pdINTEGRITY_CHECK_VALUE 0x5a5a
65-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
65+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
6666
#define pdINTEGRITY_CHECK_VALUE 0x5a5a5a5aUL
67-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_64 )
67+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS )
6868
#define pdINTEGRITY_CHECK_VALUE 0x5a5a5a5a5a5a5a5aULL
69+
#else
70+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
6971
#endif
7072

7173
/* 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 ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16 )
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
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( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16 )
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
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( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16 )
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
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 ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16 )
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
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 ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16 )
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
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 (configTICK_BIT_WIDTH == TICK_BIT_WIDTH_16)
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-
#elif ( configTICK_BIT_WIDTH == TICK_BIT_WIDTH_32 )
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

0 commit comments

Comments
 (0)