diff options
| author | Yuxin Zhou <[email protected]> | 2021-07-28 07:25:46 +0000 |
|---|---|---|
| committer | Yuxin Zhou <[email protected]> | 2021-07-28 07:25:46 +0000 |
| commit | 3574b6bc518553adefe70d82db907ae801786d6f (patch) | |
| tree | eadc713a8c532d2519bff2b6da93d31c8a98995b /common/usbx_network | |
| parent | 756899739082fd013048ae6a39dab556fddc8a11 (diff) | |
Release 6.1.8v6.1.8_rel
Diffstat (limited to 'common/usbx_network')
| -rw-r--r-- | common/usbx_network/inc/ux_network_driver.h | 25 | ||||
| -rw-r--r-- | common/usbx_network/src/ux_network_driver.c | 14 |
2 files changed, 33 insertions, 6 deletions
diff --git a/common/usbx_network/inc/ux_network_driver.h b/common/usbx_network/inc/ux_network_driver.h index ddfc5db..2efb15b 100644 --- a/common/usbx_network/inc/ux_network_driver.h +++ b/common/usbx_network/inc/ux_network_driver.h @@ -26,7 +26,7 @@ /* COMPONENT DEFINITION RELEASE */ /* */ /* ux_network_driver.h PORTABLE C */ -/* 6.1 */ +/* 6.1.8 */ /* AUTHOR */ /* */ /* Chaoqiong Xiao, Microsoft Corporation */ @@ -43,12 +43,27 @@ /* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */ /* 09-30-2020 Chaoqiong Xiao Modified comment(s), */ /* resulting in version 6.1 */ +/* 08-02-2021 Wen Wang Modified comment(s), */ +/* fixed spelling error, */ +/* added extern "C" keyword */ +/* for compatibility with C++, */ +/* resulting in version 6.1.8 */ /* */ /**************************************************************************/ #ifndef UX_NETWORK_DRIVER_H #define UX_NETWORK_DRIVER_H +/* Determine if a C++ compiler is being used. If so, ensure that standard + C is used to process the API information. */ + +#ifdef __cplusplus + +/* Yes, C++ compiler is present. Use standard C. */ +extern "C" { + +#endif + #include "tx_api.h" #include "nx_api.h" #define USB_NETWORK_DEVICE_MAX_INSTANCES 8 @@ -72,7 +87,7 @@ typedef struct USB_NETWORK_DEVICE_STRUCT /* interface_ptr is populated by NetX, as part of the interface attachment. */ NX_INTERFACE *ux_network_device_interface_ptr; - /* Define synchronization objecs for deactivation. Note that these are only + /* Define synchronization objects for deactivation. Note that these are only used if the activation/deactivation functions are not called under interrupt. */ UCHAR ux_network_device_activated_by_thread; TX_MUTEX ux_network_device_deactivate_mutex; @@ -110,4 +125,10 @@ VOID _ux_network_driver_link_up(VOID *ux_network_handle); VOID _ux_network_driver_link_down(VOID *ux_network_handle); VOID _ux_network_driver_packet_received(VOID *ux_network_handle, NX_PACKET *packet_ptr); +/* Determine if a C++ compiler is being used. If so, complete the standard + C conditional started above. */ +#ifdef __cplusplus +} +#endif + #endif diff --git a/common/usbx_network/src/ux_network_driver.c b/common/usbx_network/src/ux_network_driver.c index ce1c982..c94fd8d 100644 --- a/common/usbx_network/src/ux_network_driver.c +++ b/common/usbx_network/src/ux_network_driver.c @@ -95,7 +95,7 @@ UINT status = NX_SUCCESS; /* FUNCTION RELEASE */ /* */ /* _ux_network_driver_activate PORTABLE C */ -/* 6.1 */ +/* 6.1.8 */ /* AUTHOR */ /* */ /* Chaoqiong Xiao, Microsoft Corporation */ @@ -104,7 +104,7 @@ UINT status = NX_SUCCESS; /* */ /* The USB network driver activate function is called as the USB instance */ /* is created. This API takes a pointer to the instance, and returns a */ -/* ux_network_handle back to the instance. Everytime the instance receives*/ +/* ux_network_handle back to instance. Every time the instance receives */ /* a network packet, it should call ux_network_driver_packet_received with*/ /* ux_network_handle. */ /* */ @@ -145,6 +145,9 @@ UINT status = NX_SUCCESS; /* TX symbols instead of using */ /* them directly, */ /* resulting in version 6.1 */ +/* 08-02-2021 Wen Wang Modified comment(s), */ +/* fixed spelling error, */ +/* resulting in version 6.1.8 */ /* */ /**************************************************************************/ @@ -245,7 +248,7 @@ UINT i; /* FUNCTION RELEASE */ /* */ /* _ux_network_driver_deactivate PORTABLE C */ -/* 6.1 */ +/* 6.1.8 */ /* AUTHOR */ /* */ /* Chaoqiong Xiao, Microsoft Corporation */ @@ -254,7 +257,7 @@ UINT i; /* */ /* The USB network driver activate function is called as the USB instance */ /* is created. This API takes a pointer to the instance, and returns a */ -/* ux_network_handle back to the instance. Everytime the instance receives*/ +/* ux_network_handle back to instance. Every time the instance receives */ /* a network packet, it should call ux_network_driver_packet_received with*/ /* ux_network_handle. */ /* */ @@ -295,6 +298,9 @@ UINT i; /* TX symbols instead of using */ /* them directly, */ /* resulting in version 6.1 */ +/* 08-02-2021 Wen Wang Modified comment(s), */ +/* fixed spelling error, */ +/* resulting in version 6.1.8 */ /* */ /**************************************************************************/ UINT _ux_network_driver_deactivate(VOID *ux_instance, VOID *ux_network_handle) |
