mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Introduce configENABLE_BACKWARD_COMPATIBILITY to allow the #defines that provide backward compatibility with FreeRTOS version prior to V8 to be optionally omitted.
This commit is contained in:
parent
f01bf9fdc3
commit
a1b8079df1
|
@ -1,9 +1,21 @@
|
||||||
|
|
||||||
#ifndef STDINT_INC
|
#ifndef FREERTOS_STDINT
|
||||||
#define STDINT_INC
|
#define FREERTOS_STDINT
|
||||||
|
|
||||||
/* This file will get picked up when stdint.h does not appear in the default
|
/*******************************************************************************
|
||||||
include path (which it doesn't seem to be - even though the file exists). */
|
* THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions
|
||||||
|
* necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be
|
||||||
|
* built using compilers that do not provide their own stdint.h definition.
|
||||||
|
*
|
||||||
|
* To use this file:
|
||||||
|
*
|
||||||
|
* 1) Copy this file into the directory that contains your FreeRTOSConfig.h
|
||||||
|
* header file, as that directory will already be in the compilers include
|
||||||
|
* path.
|
||||||
|
*
|
||||||
|
* 2) Rename the copied file stdint.h.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
|
@ -12,4 +24,4 @@ typedef unsigned short uint16_t;
|
||||||
typedef long int32_t;
|
typedef long int32_t;
|
||||||
typedef unsigned long uint32_t;
|
typedef unsigned long uint32_t;
|
||||||
|
|
||||||
#endif /* STDINT_INC */
|
#endif /* FREERTOS_STDINT */
|
||||||
|
|
|
@ -1,9 +1,21 @@
|
||||||
|
|
||||||
#ifndef STDINT_INC
|
#ifndef FREERTOS_STDINT
|
||||||
#define STDINT_INC
|
#define FREERTOS_STDINT
|
||||||
|
|
||||||
/* This file will get picked up when stdint.h does not appear in the default
|
/*******************************************************************************
|
||||||
include path (which it doesn't seem to be - even though the file exists). */
|
* THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions
|
||||||
|
* necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be
|
||||||
|
* built using compilers that do not provide their own stdint.h definition.
|
||||||
|
*
|
||||||
|
* To use this file:
|
||||||
|
*
|
||||||
|
* 1) Copy this file into the directory that contains your FreeRTOSConfig.h
|
||||||
|
* header file, as that directory will already be in the compilers include
|
||||||
|
* path.
|
||||||
|
*
|
||||||
|
* 2) Rename the copied file stdint.h.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
|
@ -12,4 +24,4 @@ typedef unsigned short uint16_t;
|
||||||
typedef long int32_t;
|
typedef long int32_t;
|
||||||
typedef unsigned long uint32_t;
|
typedef unsigned long uint32_t;
|
||||||
|
|
||||||
#endif /* STDINT_INC */
|
#endif /* FREERTOS_STDINT */
|
||||||
|
|
|
@ -1,9 +1,21 @@
|
||||||
|
|
||||||
#ifndef STDINT_INC
|
#ifndef FREERTOS_STDINT
|
||||||
#define STDINT_INC
|
#define FREERTOS_STDINT
|
||||||
|
|
||||||
/* This file will get picked up when stdint.h does not appear in the default
|
/*******************************************************************************
|
||||||
include path (which it doesn't seem to be - even though the file exists). */
|
* THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions
|
||||||
|
* necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be
|
||||||
|
* built using compilers that do not provide their own stdint.h definition.
|
||||||
|
*
|
||||||
|
* To use this file:
|
||||||
|
*
|
||||||
|
* 1) Copy this file into the directory that contains your FreeRTOSConfig.h
|
||||||
|
* header file, as that directory will already be in the compilers include
|
||||||
|
* path.
|
||||||
|
*
|
||||||
|
* 2) Rename the copied file stdint.h.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
|
@ -12,4 +24,4 @@ typedef unsigned short uint16_t;
|
||||||
typedef long int32_t;
|
typedef long int32_t;
|
||||||
typedef unsigned long uint32_t;
|
typedef unsigned long uint32_t;
|
||||||
|
|
||||||
#endif /* STDINT_INC */
|
#endif /* FREERTOS_STDINT */
|
||||||
|
|
|
@ -1,9 +1,21 @@
|
||||||
|
|
||||||
#ifndef STDINT_INC
|
#ifndef FREERTOS_STDINT
|
||||||
#define STDINT_INC
|
#define FREERTOS_STDINT
|
||||||
|
|
||||||
/* This file will get picked up when stdint.h does not appear in the default
|
/*******************************************************************************
|
||||||
include path (which it doesn't seem to be - even though the file exists). */
|
* THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions
|
||||||
|
* necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be
|
||||||
|
* built using compilers that do not provide their own stdint.h definition.
|
||||||
|
*
|
||||||
|
* To use this file:
|
||||||
|
*
|
||||||
|
* 1) Copy this file into the directory that contains your FreeRTOSConfig.h
|
||||||
|
* header file, as that directory will already be in the compilers include
|
||||||
|
* path.
|
||||||
|
*
|
||||||
|
* 2) Rename the copied file stdint.h.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
|
@ -12,4 +24,4 @@ typedef unsigned short uint16_t;
|
||||||
typedef long int32_t;
|
typedef long int32_t;
|
||||||
typedef unsigned long uint32_t;
|
typedef unsigned long uint32_t;
|
||||||
|
|
||||||
#endif /* STDINT_INC */
|
#endif /* FREERTOS_STDINT */
|
||||||
|
|
|
@ -73,6 +73,14 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/* Check stdint.h was included. */
|
||||||
|
#ifndef UINT32_MAX
|
||||||
|
/* Check if the FreeRTOS stdint subset has been included. */
|
||||||
|
#ifndef FREERTOS_STDINT
|
||||||
|
#error Read the instructions in FreeRTOS/source/stdint.readme if stdint.h is not provided with your compiler.
|
||||||
|
#endif /* FREERTOS_STDINT */
|
||||||
|
#endif /* UINT32_MAX */
|
||||||
|
|
||||||
/* Basic FreeRTOS definitions. */
|
/* Basic FreeRTOS definitions. */
|
||||||
#include "projdefs.h"
|
#include "projdefs.h"
|
||||||
|
|
||||||
|
@ -684,7 +692,13 @@ is included as it is used by the port layer. */
|
||||||
#define mtCOVERAGE_TEST_MARKER()
|
#define mtCOVERAGE_TEST_MARKER()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* For backward compatibility. */
|
/* Definitions to allow backward compatibility with FreeRTOS versions prior to
|
||||||
|
V8 if desired. */
|
||||||
|
#ifndef configENABLE_BACKWARD_COMPATIBILITY
|
||||||
|
#define configENABLE_BACKWARD_COMPATIBILITY 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if configENABLE_BACKWARD_COMPATIBILITY == 1
|
||||||
#define eTaskStateGet eTaskGetState
|
#define eTaskStateGet eTaskGetState
|
||||||
#define portTickType TickType_t
|
#define portTickType TickType_t
|
||||||
#define xTaskHandle TaskHandle_t
|
#define xTaskHandle TaskHandle_t
|
||||||
|
@ -707,6 +721,7 @@ are not really required but are included for completeness. */
|
||||||
#define pdTASK_CODE TaskFunction_t
|
#define pdTASK_CODE TaskFunction_t
|
||||||
#define xListItem ListItem_t
|
#define xListItem ListItem_t
|
||||||
#define xList List_t
|
#define xList List_t
|
||||||
|
#endif /* configENABLE_BACKWARD_COMPATIBILITY */
|
||||||
|
|
||||||
#endif /* INC_FREERTOS_H */
|
#endif /* INC_FREERTOS_H */
|
||||||
|
|
||||||
|
|
27
FreeRTOS/Source/include/stdint.readme
Normal file
27
FreeRTOS/Source/include/stdint.readme
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
#ifndef FREERTOS_STDINT
|
||||||
|
#define FREERTOS_STDINT
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions
|
||||||
|
* necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be
|
||||||
|
* built using compilers that do not provide their own stdint.h definition.
|
||||||
|
*
|
||||||
|
* To use this file:
|
||||||
|
*
|
||||||
|
* 1) Copy this file into the directory that contains your FreeRTOSConfig.h
|
||||||
|
* header file, as that directory will already be in the compilers include
|
||||||
|
* path.
|
||||||
|
*
|
||||||
|
* 2) Rename the copied file stdint.h.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef signed char int8_t;
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
typedef short int16_t;
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
typedef long int32_t;
|
||||||
|
typedef unsigned long uint32_t;
|
||||||
|
|
||||||
|
#endif /* FREERTOS_STDINT */
|
Loading…
Reference in a new issue