From e6bcec1969eb9f9c4c36aaf7f2f02b7372152d0a Mon Sep 17 00:00:00 2001 From: Rahul Kar Date: Thu, 18 Apr 2024 12:28:53 +0000 Subject: [PATCH] Code review suggestions --- include/event_groups.h | 16 ++++++++-------- tasks.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/event_groups.h b/include/event_groups.h index fd5655c5e..09a5ab53a 100644 --- a/include/event_groups.h +++ b/include/event_groups.h @@ -40,15 +40,15 @@ * item value. It is important they don't clash with the * taskEVENT_LIST_ITEM_VALUE_IN_USE definition. */ #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS ) - #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint16_t ) 0x0100U ) - #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint16_t ) 0x0200U ) - #define eventWAIT_FOR_ALL_BITS ( ( uint16_t ) 0x0400U ) - #define eventEVENT_BITS_CONTROL_BYTES ( ( uint16_t ) 0xff00U ) + #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint16_t ) 0x0100 ) + #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint16_t ) 0x0200 ) + #define eventWAIT_FOR_ALL_BITS ( ( uint16_t ) 0x0400 ) + #define eventEVENT_BITS_CONTROL_BYTES ( ( uint16_t ) 0xff00 ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS ) - #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint32_t ) 0x01000000UL ) - #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint32_t ) 0x02000000UL ) - #define eventWAIT_FOR_ALL_BITS ( ( uint32_t ) 0x04000000UL ) - #define eventEVENT_BITS_CONTROL_BYTES ( ( uint32_t ) 0xff000000UL ) + #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint32_t ) 0x01000000 ) + #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint32_t ) 0x02000000 ) + #define eventWAIT_FOR_ALL_BITS ( ( uint32_t ) 0x04000000 ) + #define eventEVENT_BITS_CONTROL_BYTES ( ( uint32_t ) 0xff000000 ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS ) #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint64_t ) 0x0100000000000000 ) #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint64_t ) 0x0200000000000000 ) diff --git a/tasks.c b/tasks.c index 9092ca103..7f808cc4f 100644 --- a/tasks.c +++ b/tasks.c @@ -291,9 +291,9 @@ * responsibility of whichever module is using the value to ensure it gets set back * to its original value when it is released. */ #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS ) - #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint16_t ) 0x8000U ) + #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint16_t ) 0x8000 ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS ) - #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint32_t ) 0x80000000UL ) + #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint32_t ) 0x80000000 ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS ) #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint64_t ) 0x8000000000000000 ) #endif