2626/* APPLICATION INTERFACE DEFINITION RELEASE */
2727/* */
2828/* lx_api.h PORTABLE C */
29- /* 6.1.3 */
29+ /* 6.1.7 */
3030/* AUTHOR */
3131/* */
3232/* William E. Lamie, Microsoft Corporation */
5252/* 12-31-2020 William E. Lamie Modified comment(s), and */
5353/* updated product constants, */
5454/* resulting in version 6.1.3 */
55+ /* 06-02-2021 Bhupendra Naphade Modified comment(s), */
56+ /* added standalone support, */
57+ /* resulting in version 6.1.7 */
5558/* */
5659/**************************************************************************/
5760
@@ -71,7 +74,9 @@ extern "C" {
7174
7275/* Include necessary system files. */
7376
77+ #ifndef LX_STANDALONE_ENABLE
7478#include "tx_api.h"
79+ #endif
7580
7681/* Determine if the optional LevelX user define file should be used. */
7782
@@ -85,6 +90,65 @@ extern "C" {
8590#endif
8691
8792
93+ #ifdef LX_STANDALONE_ENABLE
94+
95+ /* Define compiler library include files. */
96+
97+ #include <stdint.h>
98+ #include <stdlib.h>
99+ #include <string.h>
100+
101+ #ifndef VOID
102+ #define VOID void
103+ typedef char CHAR ;
104+ typedef char BOOL ;
105+ typedef unsigned char UCHAR ;
106+ typedef int INT ;
107+ typedef unsigned int UINT ;
108+ typedef long LONG ;
109+ typedef unsigned long ULONG ;
110+ typedef short SHORT ;
111+ typedef unsigned short USHORT ;
112+ #endif
113+
114+ #ifndef ULONG64_DEFINED
115+ #define ULONG64_DEFINED
116+ typedef unsigned long long ULONG64 ;
117+ #endif
118+
119+ /* Define basic alignment type used in block and byte pool operations. This data type must
120+ be at least 32-bits in size and also be large enough to hold a pointer type. */
121+
122+ #ifndef ALIGN_TYPE_DEFINED
123+ #define ALIGN_TYPE_DEFINED
124+ #define ALIGN_TYPE ULONG
125+ #endif
126+
127+ /* Define the LX_MEMSET macro to the standard library function, if not already defined. */
128+ #ifndef LX_MEMSET
129+ #define LX_MEMSET (a ,b ,c ) memset((a),(b),(c))
130+ #endif
131+
132+ /* Disable usage of ThreadX mutex in standalone mode */
133+ #ifdef LX_THREAD_SAFE_ENABLE
134+ #undef LX_THREAD_SAFE_ENABLE
135+ #endif
136+
137+ #define LX_INTERRUPT_SAVE_AREA
138+ #define LX_DISABLE
139+ #define LX_RESTORE
140+
141+ #else
142+
143+ #define LX_MEMSET TX_MEMSET
144+
145+ #define LX_INTERRUPT_SAVE_AREA TX_INTERRUPT_SAVE_AREA
146+ #define LX_DISABLE TX_DISABLE
147+ #define LX_RESTORE TX_RESTORE
148+
149+ #endif
150+
151+
88152/* Disable warning of parameter not used. */
89153#ifndef LX_PARAMETER_NOT_USED
90154#define LX_PARAMETER_NOT_USED (p ) ((void)(p))
@@ -95,7 +159,7 @@ extern "C" {
95159#define AZURE_RTOS_LEVELX
96160#define LEVELX_MAJOR_VERSION 6
97161#define LEVELX_MINOR_VERSION 1
98- #define LEVELX_PATCH_VERSION 3
162+ #define LEVELX_PATCH_VERSION 7
99163
100164
101165/* Define general LevelX Constants. */
0 commit comments