Skip to content

Commit 05d00d4

Browse files
author
Scott Larson
committed
updated to 6.0.1 and added additional processors/toolchains
1 parent b652166 commit 05d00d4

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

common/core/inc/ux_api.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* APPLICATION INTERFACE DEFINITION RELEASE */
2727
/* */
2828
/* ux_api.h PORTABLE C */
29-
/* 6.0 */
29+
/* 6.0.1 */
3030
/* AUTHOR */
3131
/* */
3232
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -44,6 +44,11 @@
4444
/* DATE NAME DESCRIPTION */
4545
/* */
4646
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
47+
/* 06-30-2020 Chaoqiong Xiao Modified comment(s), and */
48+
/* updated product constants, */
49+
/* avoided div 0 in overflow */
50+
/* checking macro, */
51+
/* resulting in version 6.0.1 */
4752
/* */
4853
/**************************************************************************/
4954

@@ -128,6 +133,12 @@ typedef signed char SCHAR;
128133
#define UX_HOST_HNP_POLLING_THREAD_STACK UX_THREAD_STACK_SIZE
129134
#endif
130135

136+
/* Define basic constants for the USBX Stack. */
137+
#define AZURE_RTOS_USBX
138+
#define USBX_MAJOR_VERSION 6
139+
#define USBX_MINOR_VERSION 0
140+
#define USBX_PATCH_VERSION 1
141+
131142
/* Macros for concatenating tokens, where UX_CONCATn concatenates n tokens. */
132143

133144
#define UX_CONCAT_BASE(x,y) x ## y
@@ -155,9 +166,9 @@ typedef signed char SCHAR;
155166
#define UX_UNDERFLOW_CHECK_MINUS(a, b) ((a) < (b))
156167

157168
/* Overflow check optimized in case multiplying a 2nd factor of const. */
158-
#define UX_OVERFLOW_CHECK_MULC_ULONG(v, c) ((v) > 0xFFFFFFFFul / (c))
159-
#define UX_OVERFLOW_CHECK_MULC_USHORT(v, c) ((v) > 0xFFFFul / (c))
160-
#define UX_OVERFLOW_CHECK_MULC_UCHAR(v, c) ((v) > 0xFFul / (c))
169+
#define UX_OVERFLOW_CHECK_MULC_ULONG(v, c) (((c) != 0) && ((v) > 0xFFFFFFFFul / (c)))
170+
#define UX_OVERFLOW_CHECK_MULC_USHORT(v, c) (((c) != 0) && ((v) > 0xFFFFul / (c)))
171+
#define UX_OVERFLOW_CHECK_MULC_UCHAR(v, c) (((c) != 0) && ((v) > 0xFFul / (c)))
161172

162173
/* Overflow check optimized in case multiplying factors of variables and division instruction unavailable. */
163174
#define UX_OVERFLOW_CHECK_MULV_ULONG(v, v1) ((v) * (v1) < UX_MIN(v, v1))

0 commit comments

Comments
 (0)