In the demo code’s that i’ve read, (PIC32) it contains variables only defined by: portBASE_TYPE portSHORT portLONG etc. What is the benefit of using those assignments instead of short / long / int etc.? Does it save the variable to static when the task gets killed?
FreeRTOS.org runs on 8, 16 and 32bit devices, so these definitions are just for portability. Each port defines portSHORT to be a 16 bit type, portLONG to be a 32bit type and portBASE_TYPE to be the most efficient type for the architecture (normally 8bits for 8bit architectures, 16bits for 16bit architectures and 32bits for 32bit architectures). The demo code also follows this convention because it is run on all the supported processors. Your application code can do whatever, it does not need to use the same definitions and can use short, char, etc. directly if preferable. Regards.
Richard! Is there some port/compiller there short int (portSHORT) is not 16 bit wide? Is there some port/compiller there long int (portLONG) is not 32 bit wide?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.