diff options
| author | Scott Larson <[email protected]> | 2021-01-07 16:53:02 -0800 |
|---|---|---|
| committer | Scott Larson <[email protected]> | 2021-01-07 16:53:02 -0800 |
| commit | 9823f3857d7eb54c8416d9eab316aab0257130f9 (patch) | |
| tree | 65690334fd54075e35169ff3d34040c66ba0dbe2 /common/usbx_host_classes | |
| parent | d8014ecb428bb2d5cf50cba68dd8e7022ee35171 (diff) | |
update to v6.1.3v6.1.3_rel
Diffstat (limited to 'common/usbx_host_classes')
3 files changed, 18 insertions, 10 deletions
diff --git a/common/usbx_host_classes/inc/ux_host_class_storage.h b/common/usbx_host_classes/inc/ux_host_class_storage.h index 17b53b5..977d66c 100644 --- a/common/usbx_host_classes/inc/ux_host_class_storage.h +++ b/common/usbx_host_classes/inc/ux_host_class_storage.h @@ -26,7 +26,7 @@ /* COMPONENT DEFINITION RELEASE */ /* */ /* ux_host_class_storage.h PORTABLE C */ -/* 6.1.2 */ +/* 6.1.3 */ /* AUTHOR */ /* */ /* Chaoqiong Xiao, Microsoft Corporation */ @@ -55,6 +55,8 @@ /* 11-09-2020 Chaoqiong Xiao Modified comment(s), */ /* added exFAT type define, */ /* resulting in version 6.1.2 */ +/* 12-31-2020 Chaoqiong Xiao Modified comment(s), */ +/* resulting in version 6.1.3 */ /* */ /**************************************************************************/ @@ -482,7 +484,7 @@ typedef struct UX_HOST_CLASS_STORAGE_MEDIA_STRUCT /* Define Storage Class function prototypes. */ UINT _ux_host_class_storage_activate(UX_HOST_CLASS_COMMAND *command); -VOID _ux_host_class_storage_cbw_initialize(UX_HOST_CLASS_STORAGE *storage, UINT direction, +VOID _ux_host_class_storage_cbw_initialize(UX_HOST_CLASS_STORAGE *storage, UINT flags, ULONG data_transfer_length, UINT command_length); UINT _ux_host_class_storage_configure(UX_HOST_CLASS_STORAGE *storage); UINT _ux_host_class_storage_deactivate(UX_HOST_CLASS_COMMAND *command); diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_write.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_write.c index 2c6e34e..91ef76f 100644 --- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_write.c +++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_write.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _ux_host_class_cdc_acm_write PORTABLE C */ -/* 6.1 */ +/* 6.1.3 */ /* AUTHOR */ /* */ /* Chaoqiong Xiao, Microsoft Corporation */ @@ -74,6 +74,9 @@ /* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */ /* 09-30-2020 Chaoqiong Xiao Modified comment(s), */ /* resulting in version 6.1 */ +/* 12-31-2020 Chaoqiong Xiao Modified comment(s), */ +/* fixed ZLP sending, */ +/* resulting in version 6.1.3 */ /* */ /**************************************************************************/ UINT _ux_host_class_cdc_acm_write(UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer, @@ -122,7 +125,7 @@ ULONG transfer_request_length; /* Perform a transfer on the bulk out endpoint until either the transfer is completed or when there is an error. */ - while (requested_length) + do { /* Program the maximum authorized length for this transfer_request. */ @@ -194,7 +197,8 @@ ULONG transfer_request_length; /* Update what is left to send out. */ requested_length -= transfer_request_length; - } + + } while (requested_length); /* We get here when all the transfers went through without errors. */ return(UX_SUCCESS); diff --git a/common/usbx_host_classes/src/ux_host_class_storage_cbw_initialize.c b/common/usbx_host_classes/src/ux_host_class_storage_cbw_initialize.c index c056a17..564ec69 100644 --- a/common/usbx_host_classes/src/ux_host_class_storage_cbw_initialize.c +++ b/common/usbx_host_classes/src/ux_host_class_storage_cbw_initialize.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _ux_host_class_storage_cbw_initialize PORTABLE C */ -/* 6.1 */ +/* 6.1.3 */ /* AUTHOR */ /* */ /* Chaoqiong Xiao, Microsoft Corporation */ @@ -49,7 +49,7 @@ /* INPUT */ /* */ /* storage Pointer to storage class */ -/* direction Direction of transfer */ +/* flags Flags for transfer */ /* data_transfer_length Length of data transfer */ /* command_length Length of command */ /* */ @@ -75,9 +75,11 @@ /* verified memset and memcpy */ /* cases, */ /* resulting in version 6.1 */ +/* 12-31-2020 Chaoqiong Xiao Modified comment(s), */ +/* resulting in version 6.1.3 */ /* */ /**************************************************************************/ -VOID _ux_host_class_storage_cbw_initialize(UX_HOST_CLASS_STORAGE *storage, UINT direction, +VOID _ux_host_class_storage_cbw_initialize(UX_HOST_CLASS_STORAGE *storage, UINT flags, ULONG data_transfer_length, UINT command_length) { @@ -97,8 +99,8 @@ UCHAR *cbw; /* Store the Data Transfer Length expected for the data payload. */ _ux_utility_long_put(cbw + UX_HOST_CLASS_STORAGE_CBW_DATA_LENGTH, data_transfer_length); - /* Store the CBW Flag field that contains the transfer direction. */ - *(cbw + UX_HOST_CLASS_STORAGE_CBW_FLAGS) = (UCHAR)direction; + /* Store the CBW Flag field that contains the transfer flags. */ + *(cbw + UX_HOST_CLASS_STORAGE_CBW_FLAGS) = (UCHAR)flags; /* Store the LUN value. */ *(cbw + UX_HOST_CLASS_STORAGE_CBW_LUN) = (UCHAR)storage -> ux_host_class_storage_lun; |
