summaryrefslogtreecommitdiff
path: root/common/usbx_host_classes
diff options
context:
space:
mode:
authorScott Larson <[email protected]>2020-10-09 12:39:54 -0700
committerScott Larson <[email protected]>2020-10-09 12:39:54 -0700
commit3f1e20df866441bd7e3e8a45fffe1d5ab0413002 (patch)
treea4fd231c2da5829f8913d0c92d633e4173f2fa33 /common/usbx_host_classes
parented83d6f07d3ef30993be946b5889aaba816b1f17 (diff)
6.1 Releasev6.1_rel
Diffstat (limited to 'common/usbx_host_classes')
-rw-r--r--common/usbx_host_classes/CMakeLists.txt4
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_asix.h13
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_audio.h11
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_cdc_acm.h11
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_cdc_ecm.h15
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_gser.h9
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_hid.h14
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_hid_keyboard.h11
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_hid_mouse.h4
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_hid_remote_control.h4
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_hub.h4
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_pima.h11
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_printer.h9
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_prolific.h9
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_storage.h100
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_swar.h9
-rw-r--r--common/usbx_host_classes/inc/ux_host_class_video.h28
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_activate.c9
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_interrupt_notification.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_read.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_reception_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_setup.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_thread.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_transmission_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_asix_write.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_configure.c17
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_control_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_control_value_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_control_value_set.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_descriptor_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_device_controls_list_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_device_type_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_read.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_set.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_streaming_terminal_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_transfer_request.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_transfer_request_completed.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_write.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_capabilities_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_command.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_ioctl.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_read.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_stop.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_transfer_request_completed.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_acm_write.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_activate.c9
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_deactivate.c15
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_interrupt_notification.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_mac_address_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_thread.c12
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmission_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmit_queue_clean.c15
-rw-r--r--common/usbx_host_classes/src/ux_host_class_cdc_ecm_write.c19
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_command.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_configure.c19
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_ioctl.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_read.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_reception_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_reception_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_reception_stop.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_gser_write.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_client_register.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_client_search.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_descriptor_parse.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_entry.c40
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_field_decompress.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_global_item_parse.c10
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_idle_get.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_idle_set.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_instance_clean.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_interrupt_endpoint_search.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_item_data_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_keyboard_activate.c11
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_keyboard_callback.c18
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_keyboard_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_keyboard_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_keyboard_ioctl.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_keyboard_key_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_keyboard_thread.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_local_item_parse.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_main_item_parse.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_mouse_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_mouse_buttons_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_mouse_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_mouse_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_mouse_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_mouse_position_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_mouse_wheel_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_periodic_report_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_periodic_report_stop.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_remote_control_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_remote_control_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_remote_control_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_remote_control_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_remote_control_usage_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_add.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_callback_register.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_compress.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_decompress.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_descriptor_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_get.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_id_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_item_analyse.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_report_set.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_resources_free.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hid_transfer_request_completed.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_activate.c10
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_change_detect.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_change_process.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_configure.c22
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_deactivate.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_descriptor_get.c10
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_entry.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_feature.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_hub_change_process.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_interrupt_endpoint_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_port_change_connection_process.c10
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_port_change_enable_process.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_port_change_over_current_process.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_port_change_process.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_port_change_reset_process.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_port_change_suspend_process.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_port_reset.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_ports_power.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_status_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_hub_transfer_request_completed.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_command.c9
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_device_info_get.c26
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_device_reset.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_notification.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_num_objects_get.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_close.c9
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_copy.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_delete.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_get.c15
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_handles_get.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_info_get.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_info_send.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_move.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_open.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_send.c15
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_object_transfer_abort.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_read.c19
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_request_cancel.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_session_close.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_session_open.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_storage_ids_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_storage_info_get.c10
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_thumb_get.c15
-rw-r--r--common/usbx_host_classes/src/ux_host_class_pima_write.c15
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_name_get.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_read.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_soft_reset.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_status_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_printer_write.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_command.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_ioctl.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_read.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_reception_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_reception_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_reception_stop.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_setup.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_transfer_request_completed.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_prolific_write.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_cbw_initialize.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_deactivate.c64
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_device_initialize.c54
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_device_reset.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_device_support_check.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_driver_entry.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_entry.c131
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_max_lun_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_capacity_get.c11
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_characteristics_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_format_capacity_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_get.c120
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_lock.c101
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_mount.c23
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_open.c49
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_protection_check.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_read.c8
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_recovery_sense_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_media_write.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_partition_read.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_request_sense.c10
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_sense_code_translate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_start_stop.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_thread_entry.c160
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_transport.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_transport_bo.c11
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_transport_cb.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_transport_cbi.c9
-rw-r--r--common/usbx_host_classes/src/ux_host_class_storage_unit_ready_test.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_activate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_configure.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_deactivate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_ioctl.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_read.c7
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_reception_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_reception_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_reception_stop.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_swar_write.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_activate.c164
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_alternate_setting_locate.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_channel_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_configure.c17
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_control_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_control_list_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_control_request.c201
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_control_value_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_control_value_set.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_deactivate.c14
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_descriptor_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_endpoints_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_entities_parse.c183
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_entry.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_format_data_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_frame_data_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_frame_interval_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_frame_parameters_set.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_input_format_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_input_terminal_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_ioctl.c6
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_max_payload_get.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_read.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_start.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_stop.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_transfer_buffer_add.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_transfer_buffers_add.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_transfer_callback_set.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_transfer_request.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_transfer_request_callback.c4
-rw-r--r--common/usbx_host_classes/src/ux_host_class_video_transfer_request_completed.c4
279 files changed, 2474 insertions, 580 deletions
diff --git a/common/usbx_host_classes/CMakeLists.txt b/common/usbx_host_classes/CMakeLists.txt
index 5be86cc..35edc22 100644
--- a/common/usbx_host_classes/CMakeLists.txt
+++ b/common/usbx_host_classes/CMakeLists.txt
@@ -202,6 +202,8 @@ target_sources(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_capacity_get.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_characteristics_get.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_format_capacity_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_lock.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_mount.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_open.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_storage_media_protection_check.c
@@ -235,11 +237,13 @@ target_sources(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_configure.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_control_get.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_control_list_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_control_request.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_control_value_get.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_control_value_set.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_deactivate.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_descriptor_get.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_endpoints_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_entities_parse.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_entry.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_format_data_get.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_host_class_video_frame_data_get.c
diff --git a/common/usbx_host_classes/inc/ux_host_class_asix.h b/common/usbx_host_classes/inc/ux_host_class_asix.h
index 71d1083..477b632 100644
--- a/common/usbx_host_classes/inc/ux_host_class_asix.h
+++ b/common/usbx_host_classes/inc/ux_host_class_asix.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_asix.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -344,9 +349,9 @@ typedef struct UX_HOST_CLASS_ASIX_STRUCT
UX_INTERFACE *ux_host_class_asix_interface;
UINT ux_host_class_asix_instance_status;
UINT ux_host_class_asix_state;
- TX_SEMAPHORE ux_host_class_asix_semaphore;
- TX_SEMAPHORE ux_host_class_asix_interrupt_notification_semaphore;
- TX_THREAD ux_host_class_asix_thread;
+ UX_SEMAPHORE ux_host_class_asix_semaphore;
+ UX_SEMAPHORE ux_host_class_asix_interrupt_notification_semaphore;
+ UX_THREAD ux_host_class_asix_thread;
UCHAR *ux_host_class_asix_thread_stack;
ULONG ux_host_class_asix_notification_count;
ULONG ux_host_class_asix_primary_phy_id;
diff --git a/common/usbx_host_classes/inc/ux_host_class_audio.h b/common/usbx_host_classes/inc/ux_host_class_audio.h
index c976e2d..db23a18 100644
--- a/common/usbx_host_classes/inc/ux_host_class_audio.h
+++ b/common/usbx_host_classes/inc/ux_host_class_audio.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_audio.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -338,7 +343,7 @@ typedef struct UX_HOST_CLASS_AUDIO_STRUCT
UINT ux_host_class_audio_channels;
ULONG ux_host_class_audio_channel_control[UX_HOST_CLASS_AUDIO_MAX_CHANNEL];
UCHAR ux_host_class_audio_name[UX_HOST_CLASS_AUDIO_NAME_LENGTH];
- TX_SEMAPHORE ux_host_class_audio_semaphore;
+ UX_SEMAPHORE ux_host_class_audio_semaphore;
} UX_HOST_CLASS_AUDIO;
@@ -352,7 +357,7 @@ typedef struct UX_HOST_CLASS_AUDIO_TRANSFER_REQUEST_STRUCT
ULONG ux_host_class_audio_transfer_request_requested_length;
ULONG ux_host_class_audio_transfer_request_actual_length;
VOID (*ux_host_class_audio_transfer_request_completion_function) (struct UX_HOST_CLASS_AUDIO_TRANSFER_REQUEST_STRUCT *);
- TX_SEMAPHORE ux_host_class_audio_transfer_request_semaphore;
+ UX_SEMAPHORE ux_host_class_audio_transfer_request_semaphore;
VOID *ux_host_class_audio_transfer_request_class_instance;
UINT ux_host_class_audio_transfer_request_completion_code;
struct UX_HOST_CLASS_AUDIO_TRANSFER_REQUEST_STRUCT
diff --git a/common/usbx_host_classes/inc/ux_host_class_cdc_acm.h b/common/usbx_host_classes/inc/ux_host_class_cdc_acm.h
index 62ff9f9..0e0795a 100644
--- a/common/usbx_host_classes/inc/ux_host_class_cdc_acm.h
+++ b/common/usbx_host_classes/inc/ux_host_class_cdc_acm.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_cdc_acm.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -194,7 +199,7 @@ typedef struct UX_HOST_CLASS_CDC_ACM_STRUCT
UX_INTERFACE *ux_host_class_cdc_acm_interface;
UINT ux_host_class_cdc_acm_instance_status;
UINT ux_host_class_cdc_acm_state;
- TX_SEMAPHORE ux_host_class_cdc_acm_semaphore;
+ UX_SEMAPHORE ux_host_class_cdc_acm_semaphore;
ULONG ux_host_class_cdc_acm_notification_count;
UCHAR ux_host_class_cdc_acm_capabilities;
ULONG ux_host_class_cdc_acm_device_state;
@@ -220,7 +225,7 @@ typedef struct UX_HOST_CLASS_CDC_DLC_STRUCT
UX_INTERFACE *ux_host_class_cdc_dlc_interface;
UINT ux_host_class_cdc_dlc_instance_status;
UINT ux_host_class_cdc_dlc_state;
- TX_SEMAPHORE ux_host_class_cdc_dlc_semaphore;
+ UX_SEMAPHORE ux_host_class_cdc_dlc_semaphore;
ULONG ux_host_class_cdc_dlc_notification_count;
UCHAR ux_host_class_cdc_dlc_capabilities;
struct UX_HOST_CLASS_CDC_DLC_RECEPTION_STRUCT
diff --git a/common/usbx_host_classes/inc/ux_host_class_cdc_ecm.h b/common/usbx_host_classes/inc/ux_host_class_cdc_ecm.h
index a3f15d1..ae5e1c8 100644
--- a/common/usbx_host_classes/inc/ux_host_class_cdc_ecm.h
+++ b/common/usbx_host_classes/inc/ux_host_class_cdc_ecm.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_cdc_ecm.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -220,14 +225,14 @@ typedef struct UX_HOST_CLASS_CDC_ECM_STRUCT
UX_INTERFACE *ux_host_class_cdc_ecm_interface_control;
UCHAR ux_host_class_cdc_ecm_bulk_in_transfer_check_and_arm_in_process;
UCHAR ux_host_class_cdc_ecm_bulk_in_transfer_waiting_for_check_and_arm_to_finish;
- TX_SEMAPHORE ux_host_class_cdc_ecm_bulk_in_transfer_waiting_for_check_and_arm_to_finish_semaphore;
+ UX_SEMAPHORE ux_host_class_cdc_ecm_bulk_in_transfer_waiting_for_check_and_arm_to_finish_semaphore;
UCHAR ux_host_class_cdc_ecm_bulk_out_transfer_check_and_arm_in_process;
UCHAR ux_host_class_cdc_ecm_bulk_out_transfer_waiting_for_check_and_arm_to_finish;
- TX_SEMAPHORE ux_host_class_cdc_ecm_bulk_out_transfer_waiting_for_check_and_arm_to_finish_semaphore;
+ UX_SEMAPHORE ux_host_class_cdc_ecm_bulk_out_transfer_waiting_for_check_and_arm_to_finish_semaphore;
UINT ux_host_class_cdc_ecm_instance_status;
UINT ux_host_class_cdc_ecm_state;
- TX_SEMAPHORE ux_host_class_cdc_ecm_interrupt_notification_semaphore;
- TX_THREAD ux_host_class_cdc_ecm_thread;
+ UX_SEMAPHORE ux_host_class_cdc_ecm_interrupt_notification_semaphore;
+ UX_THREAD ux_host_class_cdc_ecm_thread;
UCHAR *ux_host_class_cdc_ecm_thread_stack;
ULONG ux_host_class_cdc_ecm_notification_count;
ULONG ux_host_class_cdc_ecm_primary_phy_id;
diff --git a/common/usbx_host_classes/inc/ux_host_class_gser.h b/common/usbx_host_classes/inc/ux_host_class_gser.h
index a9d76b6..5b84686 100644
--- a/common/usbx_host_classes/inc/ux_host_class_gser.h
+++ b/common/usbx_host_classes/inc/ux_host_class_gser.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_gser.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -155,7 +160,7 @@ typedef struct UX_HOST_CLASS_GSER_INTERFACE_STRUCT
UX_INTERFACE *ux_host_class_gser_interface;
UX_ENDPOINT *ux_host_class_gser_bulk_out_endpoint;
UX_ENDPOINT *ux_host_class_gser_bulk_in_endpoint;
- TX_SEMAPHORE ux_host_class_gser_semaphore;
+ UX_SEMAPHORE ux_host_class_gser_semaphore;
struct UX_HOST_CLASS_GSER_RECEPTION_STRUCT *ux_host_class_gser_reception;
ULONG ux_host_class_gser_notification_count;
} UX_HOST_CLASS_GSER_INTERFACE;
diff --git a/common/usbx_host_classes/inc/ux_host_class_hid.h b/common/usbx_host_classes/inc/ux_host_class_hid.h
index d7aa0d5..49b1cec 100644
--- a/common/usbx_host_classes/inc/ux_host_class_hid.h
+++ b/common/usbx_host_classes/inc/ux_host_class_hid.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_hid.h PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,10 +41,12 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
-/* fixed struct field */
-/* definition issues, */
-/* resulting in version 6.0.2 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, fixed struct */
+/* field definition issues, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -936,7 +938,7 @@ typedef struct UX_HOST_CLASS_HID_STRUCT
ux_host_class_hid_parser;
struct UX_HOST_CLASS_HID_CLIENT_STRUCT
*ux_host_class_hid_client;
- TX_SEMAPHORE ux_host_class_hid_semaphore;
+ UX_SEMAPHORE ux_host_class_hid_semaphore;
} UX_HOST_CLASS_HID;
diff --git a/common/usbx_host_classes/inc/ux_host_class_hid_keyboard.h b/common/usbx_host_classes/inc/ux_host_class_hid_keyboard.h
index 1a6a5d2..229302a 100644
--- a/common/usbx_host_classes/inc/ux_host_class_hid_keyboard.h
+++ b/common/usbx_host_classes/inc/ux_host_class_hid_keyboard.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_hid_keyboard.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -185,8 +190,8 @@ typedef struct UX_HOST_CLASS_HID_KEYBOARD_STRUCT
ULONG ux_host_class_hid_keyboard_key_count;
UX_HOST_CLASS_HID *ux_host_class_hid_keyboard_hid;
USHORT ux_host_class_hid_keyboard_id;
- TX_THREAD ux_host_class_hid_keyboard_thread;
- TX_SEMAPHORE ux_host_class_hid_keyboard_semaphore;
+ UX_THREAD ux_host_class_hid_keyboard_thread;
+ UX_SEMAPHORE ux_host_class_hid_keyboard_semaphore;
ULONG ux_host_class_hid_keyboard_alternate_key_state;
ULONG ux_host_class_hid_keyboard_led_mask;
VOID *ux_host_class_hid_keyboard_thread_stack;
diff --git a/common/usbx_host_classes/inc/ux_host_class_hid_mouse.h b/common/usbx_host_classes/inc/ux_host_class_hid_mouse.h
index 363611e..00846a7 100644
--- a/common/usbx_host_classes/inc/ux_host_class_hid_mouse.h
+++ b/common/usbx_host_classes/inc/ux_host_class_hid_mouse.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_hid_mouse.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
diff --git a/common/usbx_host_classes/inc/ux_host_class_hid_remote_control.h b/common/usbx_host_classes/inc/ux_host_class_hid_remote_control.h
index 11d006f..a8685fa 100644
--- a/common/usbx_host_classes/inc/ux_host_class_hid_remote_control.h
+++ b/common/usbx_host_classes/inc/ux_host_class_hid_remote_control.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_hid_remote_control.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
diff --git a/common/usbx_host_classes/inc/ux_host_class_hub.h b/common/usbx_host_classes/inc/ux_host_class_hub.h
index 47a77d5..50f76d5 100644
--- a/common/usbx_host_classes/inc/ux_host_class_hub.h
+++ b/common/usbx_host_classes/inc/ux_host_class_hub.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_hub.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
diff --git a/common/usbx_host_classes/inc/ux_host_class_pima.h b/common/usbx_host_classes/inc/ux_host_class_pima.h
index 009415c..5b3d0b6 100644
--- a/common/usbx_host_classes/inc/ux_host_class_pima.h
+++ b/common/usbx_host_classes/inc/ux_host_class_pima.h
@@ -25,8 +25,8 @@
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
-/* ux_host_class_cdc_acm.h PORTABLE C */
-/* 6.0 */
+/* ux_host_class_pima.h PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -367,7 +372,7 @@ typedef struct UX_HOST_CLASS_PIMA_STRUCT
struct UX_HOST_CLASS_PIMA_SESSION_STRUCT
*ux_host_class_pima_session;
UCHAR *ux_host_class_pima_container;
- TX_SEMAPHORE ux_host_class_pima_semaphore;
+ UX_SEMAPHORE ux_host_class_pima_semaphore;
VOID *ux_host_class_pima_application;
ULONG ux_host_class_pima_zlp_flag;
diff --git a/common/usbx_host_classes/inc/ux_host_class_printer.h b/common/usbx_host_classes/inc/ux_host_class_printer.h
index 7cdf4b7..8caa2eb 100644
--- a/common/usbx_host_classes/inc/ux_host_class_printer.h
+++ b/common/usbx_host_classes/inc/ux_host_class_printer.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_printer.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -86,7 +91,7 @@ typedef struct UX_HOST_CLASS_PRINTER_STRUCT
UX_ENDPOINT *ux_host_class_printer_bulk_in_endpoint;
UINT ux_host_class_printer_state;
UCHAR ux_host_class_printer_name[UX_HOST_CLASS_PRINTER_NAME_LENGTH];
- TX_SEMAPHORE ux_host_class_printer_semaphore;
+ UX_SEMAPHORE ux_host_class_printer_semaphore;
} UX_HOST_CLASS_PRINTER;
diff --git a/common/usbx_host_classes/inc/ux_host_class_prolific.h b/common/usbx_host_classes/inc/ux_host_class_prolific.h
index 79b4918..5e69646 100644
--- a/common/usbx_host_classes/inc/ux_host_class_prolific.h
+++ b/common/usbx_host_classes/inc/ux_host_class_prolific.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_prolific.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -191,7 +196,7 @@ typedef struct UX_HOST_CLASS_PROLIFIC_STRUCT
UX_INTERFACE *ux_host_class_prolific_interface;
UINT ux_host_class_prolific_instance_status;
UINT ux_host_class_prolific_state;
- TX_SEMAPHORE ux_host_class_prolific_semaphore;
+ UX_SEMAPHORE ux_host_class_prolific_semaphore;
ULONG ux_host_class_prolific_notification_count;
ULONG ux_host_class_prolific_device_state;
VOID (*ux_host_class_prolific_device_status_change_callback)(struct UX_HOST_CLASS_PROLIFIC_STRUCT *prolific,
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 afe000d..359bbd1 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.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,17 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, used UX_ */
+/* things instead of FX_ */
+/* things directly, used host */
+/* class extension pointer for */
+/* class specific structured */
+/* data, used UX prefix to */
+/* refer to TX symbols instead */
+/* of using them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -48,9 +59,49 @@
#define UX_HOST_CLASS_STORAGE_H
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
/* Include the FileX API. */
#include "fx_api.h"
+/* Refine media stubs. */
+
+#ifndef UX_MEDIA
+#define UX_MEDIA FX_MEDIA
+#endif
+
+#ifndef ux_media_id_get
+#define ux_media_id_get(m) ((m)->fx_media_id)
+#endif
+
+#ifndef ux_media_id_set
+#define ux_media_id_set(m,id) ((m)->fx_media_id=(id))
+#endif
+
+#ifndef ux_media_driver_info_get
+#define ux_media_driver_info_get(m) ((m)->fx_media_driver_info)
+#endif
+
+#ifndef ux_media_driver_info_set
+#define ux_media_driver_info_set(m,i) ((m)->fx_media_driver_info=(VOID*)(i))
+#endif
+
+#ifndef ux_media_reserved_for_user_get
+#define ux_media_reserved_for_user_get(m) ((m)->fx_media_reserved_for_user)
+#endif
+
+#ifndef ux_media_reserved_for_user_set
+#define ux_media_reserved_for_user_set(m,u) ((m)->fx_media_reserved_for_user=(ALIGN_TYPE)(u))
+#endif
+
+#ifndef ux_media_open
+#define ux_media_open fx_media_open
+#endif
+
+#ifndef ux_media_close
+#define ux_media_close fx_media_close
+#endif
+#endif
+
/* Define User configurable Storage Class constants. */
#ifndef UX_MAX_HOST_LUN
@@ -356,8 +407,8 @@
#define UX_HOST_CLASS_STORAGE_CBW_LENGTH 31
#define UX_HOST_CLASS_STORAGE_CSW_LENGTH 13
-#define UX_HOST_CLASS_STORAGE_CBW_LENGTH_ALIGNED 64
-#define UX_HOST_CLASS_STORAGE_CSW_LENGTH_ALIGNED 64
+#define UX_HOST_CLASS_STORAGE_CBW_LENGTH_ALIGNED 32
+#define UX_HOST_CLASS_STORAGE_CSW_LENGTH_ALIGNED 16
typedef struct UX_HOST_CLASS_STORAGE_STRUCT
@@ -381,26 +432,45 @@ typedef struct UX_HOST_CLASS_STORAGE_STRUCT
UINT ux_host_class_storage_max_lun;
UINT ux_host_class_storage_lun;
UINT ux_host_class_storage_lun_types[UX_MAX_HOST_LUN];
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ ULONG ux_host_class_storage_last_sector_number;
+#endif
ULONG ux_host_class_storage_sector_size;
ULONG ux_host_class_storage_data_phase_length;
UINT (*ux_host_class_storage_transport) (struct UX_HOST_CLASS_STORAGE_STRUCT *storage, UCHAR * data_pointer);
ULONG ux_host_class_storage_sense_code;
UCHAR *ux_host_class_storage_memory;
- TX_SEMAPHORE ux_host_class_storage_semaphore;
+ UX_SEMAPHORE ux_host_class_storage_semaphore;
} UX_HOST_CLASS_STORAGE;
+typedef struct UX_HOST_CLASS_STORAGE_EXT_STRUCT
+{
+ UX_THREAD ux_host_class_thread;
+ CHAR ux_host_class_thread_stack[UX_HOST_CLASS_STORAGE_THREAD_STACK_SIZE];
+} UX_HOST_CLASS_STORAGE_EXT;
+
+
/* Define Host Storage Class Media structure. */
typedef struct UX_HOST_CLASS_STORAGE_MEDIA_STRUCT
{
- FX_MEDIA ux_host_class_storage_media;
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ UX_MEDIA ux_host_class_storage_media;
+ ULONG ux_host_class_storage_media_partition_start;
+ VOID *ux_host_class_storage_media_memory;
ULONG ux_host_class_storage_media_status;
ULONG ux_host_class_storage_media_lun;
- ULONG ux_host_class_storage_media_partition_start;
ULONG ux_host_class_storage_media_sector_size;
- VOID *ux_host_class_storage_media_memory;
+#else
+ struct UX_HOST_CLASS_STORAGE_STRUCT
+ *ux_host_class_storage_media_storage;
+ ULONG ux_host_class_storage_media_number_sectors;
+ USHORT ux_host_class_storage_media_sector_size;
+ UCHAR ux_host_class_storage_media_lun;
+ UCHAR reserved;
+#endif
} UX_HOST_CLASS_STORAGE_MEDIA;
@@ -415,7 +485,15 @@ UINT _ux_host_class_storage_deactivate(UX_HOST_CLASS_COMMAND *command);
UINT _ux_host_class_storage_device_initialize(UX_HOST_CLASS_STORAGE *storage);
UINT _ux_host_class_storage_device_reset(UX_HOST_CLASS_STORAGE *storage);
UINT _ux_host_class_storage_device_support_check(UX_HOST_CLASS_STORAGE *storage);
-VOID _ux_host_class_storage_driver_entry(FX_MEDIA *media);
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+VOID _ux_host_class_storage_driver_entry(UX_MEDIA *media);
+#else
+#define _ux_host_class_storage_lock(s,w) _ux_utility_semaphore_get(&(s) -> ux_host_class_storage_semaphore, (w))
+#define _ux_host_class_storage_unlock(s) _ux_utility_semaphore_put(&(s) -> ux_host_class_storage_semaphore)
+UINT _ux_host_class_storage_media_get(UX_HOST_CLASS_STORAGE *storage, ULONG media_index, UX_HOST_CLASS_STORAGE_MEDIA **storage_media);
+UINT _ux_host_class_storage_media_lock(UX_HOST_CLASS_STORAGE_MEDIA *storage_media, ULONG wait);
+#define _ux_host_class_storage_media_unlock(m) _ux_host_class_storage_unlock((m) -> ux_host_class_storage_media_storage)
+#endif
UINT _ux_host_class_storage_endpoints_get(UX_HOST_CLASS_STORAGE *storage);
UINT _ux_host_class_storage_entry(UX_HOST_CLASS_COMMAND *command);
UINT _ux_host_class_storage_max_lun_get(UX_HOST_CLASS_STORAGE *storage);
@@ -448,4 +526,10 @@ UINT _ux_host_class_storage_unit_ready_test(UX_HOST_CLASS_STORAGE *storage);
#define ux_host_class_storage_media_read _ux_host_class_storage_media_read
#define ux_host_class_storage_media_write _ux_host_class_storage_media_write
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+#define ux_host_class_storage_media_get _ux_host_class_storage_media_get
+#define ux_host_class_storage_media_lock _ux_host_class_storage_media_lock
+#define ux_host_class_storage_media_unlock _ux_host_class_storage_media_unlock
+#endif
+
#endif
diff --git a/common/usbx_host_classes/inc/ux_host_class_swar.h b/common/usbx_host_classes/inc/ux_host_class_swar.h
index 2eecbd2..a5e9fb6 100644
--- a/common/usbx_host_classes/inc/ux_host_class_swar.h
+++ b/common/usbx_host_classes/inc/ux_host_class_swar.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_swar.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -86,7 +91,7 @@ typedef struct UX_HOST_CLASS_SWAR_STRUCT
UX_ENDPOINT *ux_host_class_swar_bulk_out_endpoint;
UX_ENDPOINT *ux_host_class_swar_bulk_in_endpoint;
UINT ux_host_class_swar_state;
- TX_SEMAPHORE ux_host_class_swar_semaphore;
+ UX_SEMAPHORE ux_host_class_swar_semaphore;
struct UX_HOST_CLASS_SWAR_RECEPTION_STRUCT
*ux_host_class_swar_reception;
diff --git a/common/usbx_host_classes/inc/ux_host_class_video.h b/common/usbx_host_classes/inc/ux_host_class_video.h
index 7308c87..2d5822b 100644
--- a/common/usbx_host_classes/inc/ux_host_class_video.h
+++ b/common/usbx_host_classes/inc/ux_host_class_video.h
@@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_video.h PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -41,6 +41,14 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added new definition, field */
+/* and functions for video */
+/* control handling, used UX */
+/* prefix to refer to TX */
+/* symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -243,6 +251,7 @@ extern UCHAR _ux_system_host_class_video_name[];
#define UX_HOST_CLASS_VIDEO_WRONG_TYPE 0x90
#define UX_HOST_CLASS_VIDEO_WRONG_INTERFACE 0x91
#define UX_HOST_CLASS_VIDEO_PARAMETER_ERROR 0x92
+#define UX_HOST_CLASS_VIDEO_DEVICE_NOT_READY 0x93
/* Define Video Class Terminal Control Selectors. */
#define UX_HOST_CLASS_VIDEO_TCS_VC_CONTROL_UNDEFINED 0x00
@@ -481,7 +490,8 @@ typedef struct UX_HOST_CLASS_VIDEO_STRUCT
UX_TRANSFER ux_host_class_video_transfer_requests[UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_COUNT];
ULONG ux_host_class_video_transfer_request_start_index;
ULONG ux_host_class_video_transfer_request_end_index;
- TX_SEMAPHORE ux_host_class_video_semaphore;
+ UX_SEMAPHORE ux_host_class_video_semaphore;
+ UX_SEMAPHORE ux_host_class_video_semaphore_control_request;
VOID (*ux_host_class_video_transfer_completion_function)(UX_TRANSFER*);
} UX_HOST_CLASS_VIDEO;
@@ -497,7 +507,7 @@ typedef struct UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_STRUCT
ULONG ux_host_class_video_transfer_request_requested_length;
ULONG ux_host_class_video_transfer_request_actual_length;
VOID (*ux_host_class_video_transfer_request_completion_function) (struct UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_STRUCT *);
- TX_SEMAPHORE ux_host_class_video_transfer_request_semaphore;
+ UX_SEMAPHORE ux_host_class_video_transfer_request_semaphore;
VOID *ux_host_class_video_transfer_request_class_instance;
UINT ux_host_class_video_transfer_request_completion_code;
struct UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_STRUCT
@@ -612,7 +622,15 @@ ULONG _ux_host_class_video_max_payload_get(UX_HOST_CLASS_VIDEO *video);
UINT _ux_host_class_video_transfer_buffer_add(UX_HOST_CLASS_VIDEO *video, UCHAR* buffer);
UINT _ux_host_class_video_transfer_buffers_add(UX_HOST_CLASS_VIDEO *video, UCHAR** buffers, ULONG num_buffers);
VOID _ux_host_class_video_transfer_callback_set(UX_HOST_CLASS_VIDEO *video, VOID (*callback_function)(UX_TRANSFER*));
-
+UINT _ux_host_class_video_entities_parse(UX_HOST_CLASS_VIDEO *video,
+ UINT(*parse_function)(VOID *arg,
+ UCHAR *packed_interface_descriptor,
+ UCHAR *packed_entity_descriptor),
+ VOID* arg);
+UINT _ux_host_class_video_control_request(UX_HOST_CLASS_VIDEO *video,
+ UINT request, UCHAR interface_index,
+ UINT entity_id, UINT control_selector,
+ UCHAR *parameter, UINT parameter_size);
/* Define Video Class API prototypes. */
@@ -629,6 +647,8 @@ VOID _ux_host_class_video_transfer_callback_set(UX_HOST_CLASS_VIDEO *video, V
#define ux_host_class_video_transfer_buffer_add _ux_host_class_video_transfer_buffer_add
#define ux_host_class_video_transfer_buffers_add _ux_host_class_video_transfer_buffers_add
#define ux_host_class_video_transfer_callback_set _ux_host_class_video_transfer_callback_set
+#define ux_host_class_video_entities_parse _ux_host_class_video_entities_parse
+#define ux_host_class_video_control_request _ux_host_class_video_control_request
#endif
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_activate.c b/common/usbx_host_classes/src/ux_host_class_asix_activate.c
index d5b2778..d39e31e 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_activate.c
@@ -36,7 +36,7 @@ UX_HOST_CLASS_ASIX_NX_ETHERNET_POOL_ALLOCSIZE_ASSERT
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -79,6 +79,11 @@ UX_HOST_CLASS_ASIX_NX_ETHERNET_POOL_ALLOCSIZE_ASSERT
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_activate(UX_HOST_CLASS_COMMAND *command)
@@ -166,7 +171,7 @@ UX_TRANSFER *transfer_request;
UX_THREAD_STACK_SIZE,
UX_THREAD_PRIORITY_CLASS,
UX_THREAD_PRIORITY_CLASS,
- TX_NO_TIME_SLICE, TX_AUTO_START);
+ TX_NO_TIME_SLICE, UX_AUTO_START);
/* Check the completion status. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_configure.c b/common/usbx_host_classes/src/ux_host_class_asix_configure.c
index 7e6f2c6..8e32a37 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_configure(UX_HOST_CLASS_ASIX *asix)
@@ -77,7 +81,9 @@ UINT _ux_host_class_asix_configure(UX_HOST_CLASS_ASIX *asix)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -99,7 +105,8 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the asix power source and check the parent power source for
incompatible connections. */
if (asix -> ux_host_class_asix_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -122,7 +129,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_deactivate.c b/common/usbx_host_classes/src/ux_host_class_asix_deactivate.c
index 349e785..de08299 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_asix_endpoints_get.c
index aef3b24..959c007 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_endpoints_get(UX_HOST_CLASS_ASIX *asix)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_entry.c b/common/usbx_host_classes/src/ux_host_class_asix_entry.c
index aeed0ca..49d288c 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_interrupt_notification.c b/common/usbx_host_classes/src/ux_host_class_asix_interrupt_notification.c
index 706c5dc..077552c 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_interrupt_notification.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_interrupt_notification.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_interrupt_notification PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_asix_interrupt_notification(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_read.c b/common/usbx_host_classes/src/ux_host_class_asix_read.c
index 643c625..68bea04 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_read (UX_HOST_CLASS_ASIX *asix, UCHAR *data_pointer,
@@ -127,7 +130,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer_request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_ASIX_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_ASIX_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS || transfer_request -> ux_transfer_request_completion_code != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_reception_callback.c b/common/usbx_host_classes/src/ux_host_class_asix_reception_callback.c
index 87d2fa4..7ae6664 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_reception_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_reception_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_reception_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_asix_reception_callback (UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_setup.c b/common/usbx_host_classes/src/ux_host_class_asix_setup.c
index d4c8770..42cd764 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_setup.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_setup.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_setup PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_setup(UX_HOST_CLASS_ASIX *asix)
@@ -283,7 +287,7 @@ UINT status;
/* Copy the node id into the Asix instance. */
- _ux_utility_memory_copy(asix -> ux_host_class_asix_node_id, setup_buffer, UX_HOST_CLASS_ASIX_NODE_ID_LENGTH);
+ _ux_utility_memory_copy(asix -> ux_host_class_asix_node_id, setup_buffer, UX_HOST_CLASS_ASIX_NODE_ID_LENGTH); /* Use case of memcpy is verified. */
/* Request ownership of Serial Management Interface. */
transfer_request -> ux_transfer_request_data_pointer = UX_NULL;
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_thread.c b/common/usbx_host_classes/src/ux_host_class_asix_thread.c
index 02615fd..791458f 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_thread.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_thread.c
@@ -34,7 +34,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_thread PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_asix_thread(ULONG parameter)
@@ -280,7 +284,7 @@ ULONG physical_address_lsw;
transfer_request -> ux_transfer_request_index = 0;
/* Fill in the multicast filter. */
- _ux_utility_memory_set(setup_buffer, 0, 8);
+ _ux_utility_memory_set(setup_buffer, 0, 8); /* Use case of memset is verified. */
*(setup_buffer +1) = 0x40;
/* Send request to HCD layer. */
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_transmission_callback.c b/common/usbx_host_classes/src/ux_host_class_asix_transmission_callback.c
index c1f6ce6..f21e96a 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_transmission_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_transmission_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_transmission_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_asix_transmission_callback (UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_asix_write.c b/common/usbx_host_classes/src/ux_host_class_asix_write.c
index dfe33c6..d42ff5d 100644
--- a/common/usbx_host_classes/src/ux_host_class_asix_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_asix_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_asix_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_asix_write(VOID *asix_class, NX_PACKET *packet)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_activate.c b/common/usbx_host_classes/src/ux_host_class_audio_activate.c
index c6bafac..33e553b 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c b/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c
index 3712513..f8dde68 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_alternate_setting_locate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_alternate_setting_locate(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_SAMPLING *audio_sampling,
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_configure.c b/common/usbx_host_classes/src/ux_host_class_audio_configure.c
index c78b876..2531061 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_configure(UX_HOST_CLASS_AUDIO *audio)
@@ -77,8 +81,10 @@ UINT _ux_host_class_audio_configure(UX_HOST_CLASS_AUDIO *audio)
UINT status;
UX_CONFIGURATION *configuration;
UX_INTERFACE *interface;
-UX_DEVICE *parent_device;
ULONG interface_number;
+#if UX_MAX_DEVICES > 1
+UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -100,7 +106,9 @@ ULONG interface_number;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
- }
+ }
+
+#if UX_MAX_DEVICES > 1
/* Check the audio power source and check the parent power source for
incompatible connections. */
if (audio -> ux_host_class_audio_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -123,7 +131,8 @@ ULONG interface_number;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration */
status = _ux_host_stack_device_configuration_select(configuration);
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_control_get.c b/common/usbx_host_classes/src/ux_host_class_audio_control_get.c
index f8f625a..926555d 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_control_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_control_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_control_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_control_get(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_CONTROL *audio_control)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_control_value_get.c b/common/usbx_host_classes/src/ux_host_class_audio_control_value_get.c
index 1d402bc..d77e6df 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_control_value_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_control_value_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_control_value_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_control_value_get(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_CONTROL *audio_control)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_control_value_set.c b/common/usbx_host_classes/src/ux_host_class_audio_control_value_set.c
index 65f0b4e..e1d1017 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_control_value_set.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_control_value_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_control_value_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_control_value_set(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_CONTROL *audio_control)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_deactivate.c b/common/usbx_host_classes/src/ux_host_class_audio_deactivate.c
index 0d7f192..d81cc00 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_descriptor_get.c b/common/usbx_host_classes/src/ux_host_class_audio_descriptor_get.c
index 41d7332..caf8d46 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_descriptor_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_descriptor_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_descriptor_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_descriptor_get(UX_HOST_CLASS_AUDIO *audio)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_device_controls_list_get.c b/common/usbx_host_classes/src/ux_host_class_audio_device_controls_list_get.c
index efaf0db..dd85165 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_device_controls_list_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_device_controls_list_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_device_controls_list_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_device_controls_list_get(UX_HOST_CLASS_AUDIO *audio)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_device_type_get.c b/common/usbx_host_classes/src/ux_host_class_audio_device_type_get.c
index 36e1365..7ac539f 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_device_type_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_device_type_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_device_type_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_device_type_get(UX_HOST_CLASS_AUDIO *audio)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_audio_endpoints_get.c
index e566d59..f1cee1c 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_endpoints_get(UX_HOST_CLASS_AUDIO *audio)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_entry.c b/common/usbx_host_classes/src/ux_host_class_audio_entry.c
index 528b74d..fca6b3a 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_read.c b/common/usbx_host_classes/src/ux_host_class_audio_read.c
index e145970..0e11056 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_read(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_TRANSFER_REQUEST *audio_transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c b/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c
index 2a9b040..411e0d1 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_streaming_sampling_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_streaming_sampling_get(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_SAMPLING_CHARACTERISTICS *audio_sampling)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_set.c b/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_set.c
index a69a932..447ffab 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_set.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_streaming_sampling_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_streaming_sampling_set(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_SAMPLING *audio_sampling)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_streaming_terminal_get.c b/common/usbx_host_classes/src/ux_host_class_audio_streaming_terminal_get.c
index 3146598..f063e93 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_streaming_terminal_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_streaming_terminal_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_streaming_terminal_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_streaming_terminal_get(UX_HOST_CLASS_AUDIO *audio)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_transfer_request.c b/common/usbx_host_classes/src/ux_host_class_audio_transfer_request.c
index 5c441e2..0a76bd4 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_transfer_request.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_transfer_request.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_transfer_request PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_transfer_request(UX_HOST_CLASS_AUDIO *audio,
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_transfer_request_completed.c b/common/usbx_host_classes/src/ux_host_class_audio_transfer_request_completed.c
index b71bf7a..1388226 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_transfer_request_completed.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_transfer_request_completed.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_transfer_request_completed PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_audio_transfer_request_completed(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_write.c b/common/usbx_host_classes/src/ux_host_class_audio_write.c
index ef197c5..481a741 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_audio_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_audio_write(UX_HOST_CLASS_AUDIO *audio, UX_HOST_CLASS_AUDIO_TRANSFER_REQUEST *audio_transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_activate.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_activate.c
index add46c5..26bd13e 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_capabilities_get.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_capabilities_get.c
index 0b614a1..2a1c863 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_capabilities_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_capabilities_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_capabilities_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_capabilities_get(UX_HOST_CLASS_CDC_ACM *cdc_acm)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_command.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_command.c
index b53be8f..5a5ddb6 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_command.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_command.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_command PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_command(UX_HOST_CLASS_CDC_ACM *cdc_acm, ULONG command,
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_configure.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_configure.c
index 81191a6..d45151e 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_configure(UX_HOST_CLASS_CDC_ACM *cdc_acm)
@@ -77,7 +81,9 @@ UINT _ux_host_class_cdc_acm_configure(UX_HOST_CLASS_CDC_ACM *cdc_acm)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -99,7 +105,8 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the cdc_acm power source and check the parent power source for
incompatible connections. */
if (cdc_acm -> ux_host_class_cdc_acm_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -122,7 +129,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_deactivate.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_deactivate.c
index 4ea0de0..97d5917 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_endpoints_get.c
index 69fb96d..720ada1 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_endpoints_get(UX_HOST_CLASS_CDC_ACM *cdc_acm)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_entry.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_entry.c
index b74f88f..8a39be3 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_ioctl.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_ioctl.c
index ea54824..c05d2d6 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_ioctl.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_ioctl.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_ioctl PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_ioctl(UX_HOST_CLASS_CDC_ACM *cdc_acm, ULONG ioctl_function,
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_read.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_read.c
index 5f62be2..5fc8def 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_read (UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_callback.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_callback.c
index dbf6477..172af05 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_reception_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_cdc_acm_reception_callback (UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_start.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_start.c
index c9ed01b..a74276f 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_reception_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_reception_start (UX_HOST_CLASS_CDC_ACM *cdc_acm,
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_stop.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_stop.c
index 73af01a..27a2b2c 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_stop.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_reception_stop.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_reception_stop PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_reception_stop(UX_HOST_CLASS_CDC_ACM *cdc_acm,
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_acm_transfer_request_completed.c b/common/usbx_host_classes/src/ux_host_class_cdc_acm_transfer_request_completed.c
index 3c54429..d3b207c 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_acm_transfer_request_completed.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_acm_transfer_request_completed.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_acm_transfer_request_completed PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_cdc_acm_transfer_request_completed(UX_TRANSFER *transfer_request)
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 ba2e7fa..2c6e34e 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.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_acm_write(UX_HOST_CLASS_CDC_ACM *cdc_acm, UCHAR *data_pointer,
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_activate.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_activate.c
index e448107..91b7f5b 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_activate.c
@@ -36,7 +36,7 @@ UX_HOST_CLASS_CDC_ECM_NX_ETHERNET_POOL_ALLOCSIZE_ASSERT
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -80,6 +80,11 @@ UX_HOST_CLASS_CDC_ECM_NX_ETHERNET_POOL_ALLOCSIZE_ASSERT
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_ecm_activate(UX_HOST_CLASS_COMMAND *command)
@@ -235,7 +240,7 @@ UX_INTERFACE *cur_interface;
UX_THREAD_STACK_SIZE,
UX_THREAD_PRIORITY_CLASS,
UX_THREAD_PRIORITY_CLASS,
- TX_NO_TIME_SLICE, TX_DONT_START);
+ UX_NO_TIME_SLICE, UX_DONT_START);
if (status == UX_SUCCESS)
{
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_deactivate.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_deactivate.c
index 6b991b9..a2d1aae 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,12 +72,17 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_ecm_deactivate(UX_HOST_CLASS_COMMAND *command)
{
-TX_INTERRUPT_SAVE_AREA
+UX_INTERRUPT_SAVE_AREA
UX_HOST_CLASS_CDC_ECM *cdc_ecm;
UX_TRANSFER *transfer_request;
@@ -118,7 +123,7 @@ UX_TRANSFER *transfer_request;
we should wait until after the transfer is armed. We must look at the CDC-ECM thread's state. */
/* Disable interrupts while we check the link state and possibly set our state. */
- TX_DISABLE
+ UX_DISABLE
/* Is it in the process of checking the link state and arming the transfer? */
if (cdc_ecm -> ux_host_class_cdc_ecm_bulk_in_transfer_check_and_arm_in_process == UX_TRUE)
@@ -130,7 +135,7 @@ UX_TRANSFER *transfer_request;
cdc_ecm -> ux_host_class_cdc_ecm_bulk_in_transfer_waiting_for_check_and_arm_to_finish = UX_TRUE;
/* Restore interrupts. */
- TX_RESTORE
+ UX_RESTORE
/* Wait for the transfer to be armed, or possibly an error. The CDC-ECM thread will wake us up. */
_ux_utility_semaphore_get(&cdc_ecm -> ux_host_class_cdc_ecm_bulk_in_transfer_waiting_for_check_and_arm_to_finish_semaphore, UX_WAIT_FOREVER);
@@ -142,7 +147,7 @@ UX_TRANSFER *transfer_request;
{
/* Restore interrupts. */
- TX_RESTORE
+ UX_RESTORE
}
/* Now we can abort the transfer. */
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_endpoints_get.c
index cb5fcfb..05ab707 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_ecm_endpoints_get(UX_HOST_CLASS_CDC_ECM *cdc_ecm)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_entry.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_entry.c
index 8ecfec9..88f7095 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_ecm_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_interrupt_notification.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_interrupt_notification.c
index fb48507..870c13a 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_interrupt_notification.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_interrupt_notification.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_interrupt_notification PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_cdc_ecm_interrupt_notification(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_mac_address_get.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_mac_address_get.c
index d4dcfa4..cad6b7b 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_mac_address_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_mac_address_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_mac_address_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_ecm_mac_address_get(UX_HOST_CLASS_CDC_ECM *cdc_ecm)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_thread.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_thread.c
index 78aab54..af76f64 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_thread.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_thread.c
@@ -34,7 +34,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_thread PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,6 +76,12 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_cdc_ecm_thread(ULONG parameter)
@@ -114,7 +120,7 @@ UINT status;
/* We can accept reception. Get a NX Packet. */
status = nx_packet_allocate(&cdc_ecm -> ux_host_class_cdc_ecm_packet_pool, &packet,
- NX_RECEIVE_PACKET, MS_TO_TICK(UX_HOST_CLASS_CDC_ECM_PACKET_POOL_WAIT));
+ NX_RECEIVE_PACKET, UX_MS_TO_TICK(UX_HOST_CLASS_CDC_ECM_PACKET_POOL_WAIT));
if (status == NX_SUCCESS)
{
@@ -158,7 +164,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, TX_WAIT_FOREVER);
+ _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_WAIT_FOREVER);
/* Check the transfer status. If there is a transport error, we ignore the packet
and restart it. */
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmission_callback.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmission_callback.c
index 9802e33..82095e6 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmission_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmission_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_transmission_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_cdc_ecm_transmission_callback(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmit_queue_clean.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmit_queue_clean.c
index 843f7be..308be1d 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmit_queue_clean.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_transmit_queue_clean.c
@@ -34,7 +34,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_transmit_queue_clean PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,19 +66,24 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_cdc_ecm_transmit_queue_clean(UX_HOST_CLASS_CDC_ECM *cdc_ecm)
{
-TX_INTERRUPT_SAVE_AREA
+UX_INTERRUPT_SAVE_AREA
NX_PACKET *current_packet;
NX_PACKET *next_packet;
/* Disable interrupts while we check the write in process flag and
set our own state. */
- TX_DISABLE
+ UX_DISABLE
/* Is there a write in process? */
if (cdc_ecm -> ux_host_class_cdc_ecm_bulk_out_transfer_check_and_arm_in_process == UX_TRUE)
@@ -91,7 +96,7 @@ NX_PACKET *next_packet;
cdc_ecm -> ux_host_class_cdc_ecm_bulk_out_transfer_waiting_for_check_and_arm_to_finish = UX_TRUE;
/* Restore interrupts while we wait. */
- TX_RESTORE
+ UX_RESTORE
/* Wait for write function to resume us. */
_ux_utility_semaphore_get(&cdc_ecm -> ux_host_class_cdc_ecm_bulk_out_transfer_waiting_for_check_and_arm_to_finish_semaphore, UX_WAIT_FOREVER);
@@ -104,7 +109,7 @@ NX_PACKET *next_packet;
/* No writes are in process. Restore interrupts and go on to free
the xmit queue. */
- TX_RESTORE
+ UX_RESTORE
}
/* Abort transfers on the bulk out endpoint. Note we need to do this
diff --git a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_write.c b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_write.c
index 8a8f708..4c52d60 100644
--- a/common/usbx_host_classes/src/ux_host_class_cdc_ecm_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_cdc_ecm_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_cdc_ecm_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,12 +69,17 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_cdc_ecm_write(VOID *cdc_ecm_class, NX_PACKET *packet)
{
-TX_INTERRUPT_SAVE_AREA
+UX_INTERRUPT_SAVE_AREA
UX_TRANSFER *transfer_request;
UINT status;
@@ -94,14 +99,14 @@ UX_HOST_CLASS_CDC_ECM *cdc_ecm;
queue is non-null, it remains non-null until we have queued the packet.
Note that we do not have to worry about the case where the queue is null,
because we are the only ones that can change it from null to non-null. */
- TX_DISABLE
+ UX_DISABLE
/* Ensure the instance is valid. */
if (cdc_ecm -> ux_host_class_cdc_ecm_state != UX_HOST_CLASS_INSTANCE_LIVE)
{
/* Restore interrupts. */
- TX_RESTORE
+ UX_RESTORE
/* Error trap. */
_ux_system_error_handler(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_CLASS, UX_HOST_CLASS_INSTANCE_UNKNOWN);
@@ -128,7 +133,7 @@ UX_HOST_CLASS_CDC_ECM *cdc_ecm;
cdc_ecm -> ux_host_class_cdc_ecm_xmit_queue_tail = packet;
/* Restore interrupts. */
- TX_RESTORE
+ UX_RESTORE
/* Now we need to arm the transfer. */
@@ -180,7 +185,7 @@ UX_HOST_CLASS_CDC_ECM *cdc_ecm;
cdc_ecm -> ux_host_class_cdc_ecm_xmit_queue_tail = packet;
/* Restore interrupts. */
- TX_RESTORE
+ UX_RESTORE
/* Successfully added to queue. */
status = UX_SUCCESS;
@@ -192,7 +197,7 @@ UX_HOST_CLASS_CDC_ECM *cdc_ecm;
/* Link was down. */
/* Restore interrupts. */
- TX_RESTORE
+ UX_RESTORE
/* Release the packet. */
packet -> nx_packet_prepend_ptr = packet -> nx_packet_prepend_ptr + UX_HOST_CLASS_CDC_ECM_ETHERNET_SIZE;
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_activate.c b/common/usbx_host_classes/src/ux_host_class_gser_activate.c
index fa49e51..6886bb9 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_command.c b/common/usbx_host_classes/src/ux_host_class_gser_command.c
index 6146204..2584875 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_command.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_command.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_command PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_command(UX_HOST_CLASS_GSER *gser, ULONG interface_index, ULONG command,
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_configure.c b/common/usbx_host_classes/src/ux_host_class_gser_configure.c
index d0ab93b..3c2e901 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_configure.c
@@ -34,8 +34,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_host_class_gser_configure PORTABLE C */
-/* 6.0 */
+/* _ux_host_class_gser_configure PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_configure(UX_HOST_CLASS_GSER *gser)
@@ -77,8 +81,11 @@ UINT _ux_host_class_gser_configure(UX_HOST_CLASS_GSER *gser)
UINT status;
UX_CONFIGURATION *configuration;
-UX_DEVICE *parent_device;
ULONG interface_index;
+#if UX_MAX_DEVICES > 1
+UX_DEVICE *parent_device;
+#endif
+
/* If the device has been configured already, we don't need to do it
again. */
@@ -99,7 +106,8 @@ ULONG interface_index;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the gser power source and check the parent power source for
incompatible connections. */
if (gser -> ux_host_class_gser_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -122,7 +130,8 @@ ULONG interface_index;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_deactivate.c b/common/usbx_host_classes/src/ux_host_class_gser_deactivate.c
index 4ecdfb8..921b9ff 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_gser_endpoints_get.c
index ca59f94..dbc2f2a 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_endpoints_get(UX_HOST_CLASS_GSER *gser)
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_entry.c b/common/usbx_host_classes/src/ux_host_class_gser_entry.c
index 122c9ff..11d51b4 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_ioctl.c b/common/usbx_host_classes/src/ux_host_class_gser_ioctl.c
index eff1cd7..4458c6a 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_ioctl.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_ioctl.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_ioctl PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_ioctl(UX_HOST_CLASS_GSER *gser, ULONG interface_index, ULONG ioctl_function,
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_read.c b/common/usbx_host_classes/src/ux_host_class_gser_read.c
index 933d046..e3146d5 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_read(UX_HOST_CLASS_GSER *gser,
@@ -139,7 +142,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer_request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_GSER_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_GSER_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_reception_callback.c b/common/usbx_host_classes/src/ux_host_class_gser_reception_callback.c
index 098aca0..fc2ca98 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_reception_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_reception_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_reception_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_gser_reception_callback (UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_reception_start.c b/common/usbx_host_classes/src/ux_host_class_gser_reception_start.c
index 551bd0e..4642b2e 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_reception_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_reception_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_reception_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_reception_start (UX_HOST_CLASS_GSER *gser,
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_reception_stop.c b/common/usbx_host_classes/src/ux_host_class_gser_reception_stop.c
index 7f9b4d4..c0cda17 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_reception_stop.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_reception_stop.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_reception_stop PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_reception_stop (UX_HOST_CLASS_GSER *gser,
diff --git a/common/usbx_host_classes/src/ux_host_class_gser_write.c b/common/usbx_host_classes/src/ux_host_class_gser_write.c
index 9fbb1cc..df45c95 100644
--- a/common/usbx_host_classes/src/ux_host_class_gser_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_gser_write.c
@@ -34,7 +34,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_gser_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_gser_write(UX_HOST_CLASS_GSER *gser,
@@ -134,7 +137,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_GSER_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_GSER_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_activate.c b/common/usbx_host_classes/src/ux_host_class_hid_activate.c
index 723e8a3..edcf715 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_client_register.c b/common/usbx_host_classes/src/ux_host_class_hid_client_register.c
index 945ef98..df7c3ce 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_client_register.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_client_register.c
@@ -36,7 +36,7 @@ UX_COMPILE_TIME_ASSERT(!UX_OVERFLOW_CHECK_MULC_ULONG(UX_HOST_CLASS_HID_MAX_CLIEN
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_client_register PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -83,6 +83,10 @@ UX_COMPILE_TIME_ASSERT(!UX_OVERFLOW_CHECK_MULC_ULONG(UX_HOST_CLASS_HID_MAX_CLIEN
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_client_register(UCHAR *hid_client_name,
@@ -138,7 +142,7 @@ UINT client_name_length = 0;
{
/* We have found a free container for the HID client. Copy the name (with null-terminator). */
- _ux_utility_memory_copy(hid_client -> ux_host_class_hid_client_name, hid_client_name, client_name_length + 1);
+ _ux_utility_memory_copy(hid_client -> ux_host_class_hid_client_name, hid_client_name, client_name_length + 1); /* Use case of memcpy is verified. */
/* Memorize the handler address of this client. */
hid_client -> ux_host_class_hid_client_handler = hid_client_handler;
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_client_search.c b/common/usbx_host_classes/src/ux_host_class_hid_client_search.c
index 1d96ce9..4ec136d 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_client_search.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_client_search.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_client_search PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_client_search(UX_HOST_CLASS_HID *hid)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_configure.c b/common/usbx_host_classes/src/ux_host_class_hid_configure.c
index 71641a2..5f7b11a 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_configure(UX_HOST_CLASS_HID *hid)
@@ -77,8 +81,10 @@ UINT _ux_host_class_hid_configure(UX_HOST_CLASS_HID *hid)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *device;
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it again. */
@@ -99,9 +105,10 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
+#if UX_MAX_DEVICES > 1
/* Get the device container for this configuration. */
device = configuration -> ux_configuration_device;
-
+
/* Get the parent container for this device. */
parent_device = device -> ux_device_parent;
@@ -124,7 +131,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_deactivate.c b/common/usbx_host_classes/src/ux_host_class_hid_deactivate.c
index 7b8574a..cc66138 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_descriptor_parse.c b/common/usbx_host_classes/src/ux_host_class_hid_descriptor_parse.c
index 10f0dbb..5df4c05 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_descriptor_parse.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_descriptor_parse.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_descriptor_parse PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_descriptor_parse(UX_HOST_CLASS_HID *hid)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_entry.c b/common/usbx_host_classes/src/ux_host_class_hid_entry.c
index c90d204..a0bbfc2 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -58,6 +58,7 @@
/* */
/* _ux_host_class_hid_activate Activate HID class */
/* _ux_host_class_hid_deactivate Deactivate HID class */
+/* _ux_utility_memory_free Free memory */
/* */
/* CALLED BY */
/* */
@@ -69,12 +70,18 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added destroy command, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_entry(UX_HOST_CLASS_COMMAND *command)
{
-UINT status;
+UINT status;
+INT scan_index;
+UX_HOST_CLASS_HID_CLIENT *client;
+UX_HOST_CLASS_HID_CLIENT_COMMAND client_command;
/* The command request will tell us we need to do here, either a enumeration
@@ -99,7 +106,6 @@ UINT status;
is ready to complete the enumeration. */
status = _ux_host_class_hid_activate(command);
-
return(status);
@@ -107,9 +113,37 @@ UINT status;
/* The deactivate command is used when the device has been extracted either
directly or when its parents has been extracted. */
+
status = _ux_host_class_hid_deactivate(command);
return(status);
+ case UX_HOST_CLASS_COMMAND_DESTROY:
+
+ /* The destroy command is used when the class is unregistered. */
+
+ /* Free allocated resources for clients. */
+ if (command -> ux_host_class_command_class_ptr -> ux_host_class_client != UX_NULL)
+ {
+
+ /* Get client. */
+ client = command -> ux_host_class_command_class_ptr -> ux_host_class_client;
+
+ /* Inform clients for destroy. */
+ for (scan_index = 0; scan_index < UX_HOST_CLASS_HID_MAX_CLIENTS; scan_index ++)
+ {
+
+ /* Inform client for destroy. */
+ client_command.ux_host_class_hid_client_command_request = UX_HOST_CLASS_COMMAND_DESTROY;
+ client_command.ux_host_class_hid_client_command_container = (VOID *)command -> ux_host_class_command_class_ptr;
+ client -> ux_host_class_hid_client_handler(&client_command);
+ }
+
+ /* Free clients memory. */
+ _ux_utility_memory_free(command -> ux_host_class_command_class_ptr -> ux_host_class_client);
+ command -> ux_host_class_command_class_ptr -> ux_host_class_client = UX_NULL;
+ }
+ return(UX_SUCCESS);
+
default:
/* Error trap. */
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_field_decompress.c b/common/usbx_host_classes/src/ux_host_class_hid_field_decompress.c
index 9653466..afb7287 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_field_decompress.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_field_decompress.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_field_decompress PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_field_decompress(UX_HOST_CLASS_HID_FIELD *hid_field, UCHAR *report_buffer, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_global_item_parse.c b/common/usbx_host_classes/src/ux_host_class_hid_global_item_parse.c
index 58b176f..83cdd49 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_global_item_parse.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_global_item_parse.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_global_item_parse PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_global_item_parse(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_ITEM *item, UCHAR *descriptor)
@@ -205,7 +209,7 @@ UX_HOST_CLASS_HID_PARSER *hid_parser;
else
_ux_utility_memory_copy(&hid_parser -> ux_host_class_hid_parser_global_pool[hid_parser -> ux_host_class_hid_parser_number_global++],
- &hid_parser -> ux_host_class_hid_parser_global, sizeof(UX_HOST_CLASS_HID_GLOBAL_ITEM));
+ &hid_parser -> ux_host_class_hid_parser_global, sizeof(UX_HOST_CLASS_HID_GLOBAL_ITEM)); /* Use case of memcpy is verified. */
break;
@@ -226,7 +230,7 @@ UX_HOST_CLASS_HID_PARSER *hid_parser;
else
_ux_utility_memory_copy(&hid_parser -> ux_host_class_hid_parser_global,
&hid_parser -> ux_host_class_hid_parser_global_pool[--hid_parser -> ux_host_class_hid_parser_number_global],
- sizeof(UX_HOST_CLASS_HID_GLOBAL_ITEM));
+ sizeof(UX_HOST_CLASS_HID_GLOBAL_ITEM)); /* Use case of memcpy is verified. */
break;
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_idle_get.c b/common/usbx_host_classes/src/ux_host_class_hid_idle_get.c
index 5deb535..c7d906c 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_idle_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_idle_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_idle_get PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,10 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* protected default control */
/* endpoint before using it, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_idle_get(UX_HOST_CLASS_HID *hid, USHORT *idle_time, USHORT report_id)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_idle_set.c b/common/usbx_host_classes/src/ux_host_class_hid_idle_set.c
index 42eaf96..eb7602f 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_idle_set.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_idle_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_idle_set PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,10 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* protected default control */
/* endpoint before using it, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_idle_set(UX_HOST_CLASS_HID *hid, USHORT idle_time, USHORT report_id)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_instance_clean.c b/common/usbx_host_classes/src/ux_host_class_hid_instance_clean.c
index 5e9d52c..f5ef2c3 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_instance_clean.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_instance_clean.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_instance_clean PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_instance_clean(UX_HOST_CLASS_HID *hid)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_interrupt_endpoint_search.c b/common/usbx_host_classes/src/ux_host_class_hid_interrupt_endpoint_search.c
index 4e8988d..34f807d 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_interrupt_endpoint_search.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_interrupt_endpoint_search.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_interrupt_endpoint_search PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_interrupt_endpoint_search(UX_HOST_CLASS_HID *hid)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_item_data_get.c b/common/usbx_host_classes/src/ux_host_class_hid_item_data_get.c
index 58bf853..1a8f90d 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_item_data_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_item_data_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_item_data_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
ULONG _ux_host_class_hid_item_data_get(UCHAR *descriptor, UX_HOST_CLASS_HID_ITEM *item)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_activate.c b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_activate.c
index 6712d00..fbdfced 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_activate.c
@@ -98,7 +98,7 @@ UX_HOST_CLASS_HID_KEYBOARD_LAYOUT ux_host_class_hid_keyboard_layout =
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_keyboard_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -140,6 +140,11 @@ UX_HOST_CLASS_HID_KEYBOARD_LAYOUT ux_host_class_hid_keyboard_layout =
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_keyboard_activate(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
@@ -307,7 +312,7 @@ UX_HOST_CLASS_HID_FIELD *field;
status = _ux_utility_thread_create(&keyboard_instance -> ux_host_class_hid_keyboard_thread, "ux_host_stack_keyboard_thread",_ux_host_class_hid_keyboard_thread,
(ULONG) (ALIGN_TYPE) keyboard_instance, keyboard_instance -> ux_host_class_hid_keyboard_thread_stack,
UX_THREAD_STACK_SIZE, UX_THREAD_PRIORITY_KEYBOARD,
- UX_THREAD_PRIORITY_KEYBOARD, UX_NO_TIME_SLICE, TX_AUTO_START);
+ UX_THREAD_PRIORITY_KEYBOARD, UX_NO_TIME_SLICE, UX_AUTO_START);
/* If we are OK, go on. */
if (status == UX_SUCCESS)
@@ -398,7 +403,7 @@ UX_HOST_CLASS_HID_FIELD *field;
_ux_utility_memory_free(keyboard_instance -> ux_host_class_hid_keyboard_thread_stack);
/* Delete semaphore. */
- if (keyboard_instance -> ux_host_class_hid_keyboard_semaphore.tx_semaphore_id != TX_EMPTY)
+ if (keyboard_instance -> ux_host_class_hid_keyboard_semaphore.tx_semaphore_id != UX_EMPTY)
_ux_utility_semaphore_delete(&keyboard_instance -> ux_host_class_hid_keyboard_semaphore);
/* Free usage array. */
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_callback.c b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_callback.c
index a9dedbd..d690a1f 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_keyboard_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hid_keyboard_callback(UX_HOST_CLASS_HID_REPORT_CALLBACK *callback)
@@ -171,7 +175,7 @@ UCHAR *state_action;
/* Get the current states of the lock keys and immediately initialize them to zero;
if a lock key is not pressed in this report, it will remain zero (not pressed). */
current_lock_key_states = &keyboard_instance -> ux_host_class_hid_keyboard_key_state[3];
- _ux_utility_memory_set(current_lock_key_states, 0, 3);
+ _ux_utility_memory_set(current_lock_key_states, 0, 3); /* Use case of memset is verified. */
/* Scan the report buffer and decode it. */
while(report_buffer < report_buffer_end)
@@ -191,9 +195,9 @@ UCHAR *state_action;
state_action = state_value + keyboard_instance -> ux_host_class_hid_keyboard_key_count * 2;
/* Reset state actions to DEL(not received). */
- _ux_utility_memory_set(state_usage + keyboard_instance -> ux_host_class_hid_keyboard_key_count, 0, keyboard_instance -> ux_host_class_hid_keyboard_key_count);
- _ux_utility_memory_set(state_value + keyboard_instance -> ux_host_class_hid_keyboard_key_count, 0, keyboard_instance -> ux_host_class_hid_keyboard_key_count);
- _ux_utility_memory_set(state_action, KEY_DEL, keyboard_instance -> ux_host_class_hid_keyboard_key_count * 2);
+ _ux_utility_memory_set(state_usage + keyboard_instance -> ux_host_class_hid_keyboard_key_count, 0, keyboard_instance -> ux_host_class_hid_keyboard_key_count); /* Use case of memset is verified. */
+ _ux_utility_memory_set(state_value + keyboard_instance -> ux_host_class_hid_keyboard_key_count, 0, keyboard_instance -> ux_host_class_hid_keyboard_key_count); /* Use case of memset is verified. */
+ _ux_utility_memory_set(state_action, KEY_DEL, keyboard_instance -> ux_host_class_hid_keyboard_key_count * 2); /* Use case of memset is verified. */
new_count = keyboard_instance -> ux_host_class_hid_keyboard_key_count;
while(report_buffer < report_buffer_end)
@@ -557,11 +561,11 @@ UCHAR *state_action;
/* Copy the current lock key states to the previous states. Note that if
a lock key wasn't down in this report, its current state would have
remained zero (not pressed). */
- _ux_utility_memory_copy(previous_lock_key_states, current_lock_key_states, 3);
+ _ux_utility_memory_copy(previous_lock_key_states, current_lock_key_states, 3); /* Use case of memcpy is verified. */
#else
/* Clear redundant data after last saved key. */
- _ux_utility_memory_set(state_usage + i_save, 0, keyboard_instance -> ux_host_class_hid_keyboard_key_count - i_save);
+ _ux_utility_memory_set(state_usage + i_save, 0, keyboard_instance -> ux_host_class_hid_keyboard_key_count - i_save); /* Use case of memset is verified. */
#endif
/* Return to caller. */
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_deactivate.c b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_deactivate.c
index 968cbd2..a78d34c 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_deactivate.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_keyboard_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_keyboard_deactivate(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_entry.c b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_entry.c
index ae9e4c6..df8bd09 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_entry.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_keyboard_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_keyboard_entry(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_ioctl.c b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_ioctl.c
index 5a7574e..46aad27 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_ioctl.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_ioctl.c
@@ -37,7 +37,7 @@ extern UX_HOST_CLASS_HID_KEYBOARD_LAYOUT ux_host_class_hid_keyboard_layout;
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_keyboard_ioctl PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@ extern UX_HOST_CLASS_HID_KEYBOARD_LAYOUT ux_host_class_hid_keyboard_layout;
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_keyboard_ioctl(UX_HOST_CLASS_HID_KEYBOARD *keyboard_instance,
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_key_get.c b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_key_get.c
index 0e02029..ea5e69c 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_key_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_key_get.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_keyboard_key_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_keyboard_key_get(UX_HOST_CLASS_HID_KEYBOARD *keyboard_instance,
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_thread.c b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_thread.c
index fbd52e7..23baf1f 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_keyboard_thread.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_keyboard_thread.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_keyboard_thread PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hid_keyboard_thread(ULONG thread_input)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_local_item_parse.c b/common/usbx_host_classes/src/ux_host_class_hid_local_item_parse.c
index 16677de..f7822f5 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_local_item_parse.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_local_item_parse.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_local_item_parse PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_local_item_parse(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_ITEM *item, UCHAR *descriptor)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_main_item_parse.c b/common/usbx_host_classes/src/ux_host_class_hid_main_item_parse.c
index 352f900..5cf3f93 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_main_item_parse.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_main_item_parse.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_main_item_parse PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_main_item_parse(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_ITEM *item, UCHAR *descriptor)
@@ -175,7 +179,7 @@ ULONG collection_type;
}
/* We have a new main item, so the local instances have to be cleaned. */
- _ux_utility_memory_set(&hid_parser -> ux_host_class_hid_parser_local, 0, sizeof(UX_HOST_CLASS_HID_LOCAL_ITEM));
+ _ux_utility_memory_set(&hid_parser -> ux_host_class_hid_parser_local, 0, sizeof(UX_HOST_CLASS_HID_LOCAL_ITEM)); /* Use case of memset is verified. */
/* Return completion status. */
return(status);
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_mouse_activate.c b/common/usbx_host_classes/src/ux_host_class_hid_mouse_activate.c
index 61cb418..96b0ac4 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_mouse_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_mouse_activate.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_mouse_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_mouse_activate(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_mouse_buttons_get.c b/common/usbx_host_classes/src/ux_host_class_hid_mouse_buttons_get.c
index 139c9f0..d1e5295 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_mouse_buttons_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_mouse_buttons_get.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_mouse_buttons_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_mouse_buttons_get(UX_HOST_CLASS_HID_MOUSE *mouse_instance,
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_mouse_callback.c b/common/usbx_host_classes/src/ux_host_class_hid_mouse_callback.c
index 9e453e1..c95ed59 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_mouse_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_mouse_callback.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_mouse_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hid_mouse_callback(UX_HOST_CLASS_HID_REPORT_CALLBACK *callback)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_mouse_deactivate.c b/common/usbx_host_classes/src/ux_host_class_hid_mouse_deactivate.c
index 8a06cf4..c7cf7db 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_mouse_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_mouse_deactivate.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_mouse_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_mouse_deactivate(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_mouse_entry.c b/common/usbx_host_classes/src/ux_host_class_hid_mouse_entry.c
index a81662d..322b332 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_mouse_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_mouse_entry.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_mouse_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_mouse_entry(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_mouse_position_get.c b/common/usbx_host_classes/src/ux_host_class_hid_mouse_position_get.c
index 3b582f7..df28dc1 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_mouse_position_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_mouse_position_get.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_mouse_position_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_mouse_position_get(UX_HOST_CLASS_HID_MOUSE *mouse_instance,
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_mouse_wheel_get.c b/common/usbx_host_classes/src/ux_host_class_hid_mouse_wheel_get.c
index 7b20092..f20ecef 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_mouse_wheel_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_mouse_wheel_get.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_mouse_wheel_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_mouse_wheel_get(UX_HOST_CLASS_HID_MOUSE *mouse_instance,
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_start.c b/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_start.c
index eb11b5d..aacb26e 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_periodic_report_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_periodic_report_start(UX_HOST_CLASS_HID *hid)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_stop.c b/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_stop.c
index 5b5845c..a2ee3cd 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_stop.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_periodic_report_stop.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_periodic_report_stop PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_periodic_report_stop(UX_HOST_CLASS_HID *hid)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_activate.c b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_activate.c
index 0cb1032..b5bc0be 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_activate.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_remote_control_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_remote_control_activate(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_callback.c b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_callback.c
index 0997f2d..ef8ac8a 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_callback.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_remote_control_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hid_remote_control_callback(UX_HOST_CLASS_HID_REPORT_CALLBACK *callback)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_deactivate.c b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_deactivate.c
index 8146336..d2083ba 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_deactivate.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_remote_control_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_remote_control_deactivate(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_entry.c b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_entry.c
index 6fb8812..02336dd 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_entry.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_remote_control_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_remote_control_entry(UX_HOST_CLASS_HID_CLIENT_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_usage_get.c b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_usage_get.c
index 8fbd9a1..7d48323 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_remote_control_usage_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_remote_control_usage_get.c
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_remote_control_usage_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_remote_control_usage_get(UX_HOST_CLASS_HID_REMOTE_CONTROL *remote_control_instance, ULONG *usage, ULONG *value)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_add.c b/common/usbx_host_classes/src/ux_host_class_hid_report_add.c
index 59ca089..65bfaae 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_add.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_add.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_add PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_add(UX_HOST_CLASS_HID *hid, UCHAR *descriptor, UX_HOST_CLASS_HID_ITEM *item)
@@ -279,7 +283,7 @@ ULONG current_field_address;
}
/* Copy the current usages in the field structure. */
- _ux_utility_memory_copy(new_hid_field -> ux_host_class_hid_field_usages, hid_parser -> ux_host_class_hid_parser_local.ux_host_class_hid_local_item_usages, hid_field_count*4);
+ _ux_utility_memory_copy(new_hid_field -> ux_host_class_hid_field_usages, hid_parser -> ux_host_class_hid_parser_local.ux_host_class_hid_local_item_usages, hid_field_count*4); /* Use case of memcpy is verified. */
}
/* Save the number of usages. */
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_callback_register.c b/common/usbx_host_classes/src/ux_host_class_hid_report_callback_register.c
index 960d810..1451e3a 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_callback_register.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_callback_register.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_callback_register PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_callback_register(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_REPORT_CALLBACK *call_back)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_compress.c b/common/usbx_host_classes/src/ux_host_class_hid_report_compress.c
index 2264881..b185890 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_compress.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_compress.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_compress PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_compress(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report,
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_decompress.c b/common/usbx_host_classes/src/ux_host_class_hid_report_decompress.c
index e3eedcd..91ed3bc 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_decompress.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_decompress.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_decompress PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_decompress(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report,
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_descriptor_get.c b/common/usbx_host_classes/src/ux_host_class_hid_report_descriptor_get.c
index 628bebf..cb16409 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_descriptor_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_descriptor_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_descriptor_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_descriptor_get(UX_HOST_CLASS_HID *hid, ULONG length)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_get.c b/common/usbx_host_classes/src/ux_host_class_hid_report_get.c
index 0c3cd1d..f1c8179 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_get PORTABLE C */
-/* 6.0.2 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,11 +75,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
-/* 08-14-2020 Chaoqiong Xiao Modified comment(s), */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* verified memset and memcpy */
/* cases, accepted both INPUT */
/* and FEATURE reports, */
-/* resulting in version 6.0.2 */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_get(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_id_get.c b/common/usbx_host_classes/src/ux_host_class_hid_report_id_get.c
index 71d1a26..d5ca2e4 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_id_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_id_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_id_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_id_get(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_REPORT_GET_ID *report_id)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_item_analyse.c b/common/usbx_host_classes/src/ux_host_class_hid_report_item_analyse.c
index d99351a..434b96b 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_item_analyse.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_item_analyse.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_item_analyse PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_item_analyse(UCHAR *descriptor, UX_HOST_CLASS_HID_ITEM *item)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_report_set.c b/common/usbx_host_classes/src/ux_host_class_hid_report_set.c
index 688010a..63d8c42 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_report_set.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_report_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_report_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_report_set(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report)
@@ -161,7 +165,7 @@ UINT status;
{
/* We have enough memory to store the raw buffer. */
- _ux_utility_memory_copy(current_report_buffer, client_report -> ux_host_class_hid_client_report_buffer, hid_report -> ux_host_class_hid_report_byte_length);
+ _ux_utility_memory_copy(current_report_buffer, client_report -> ux_host_class_hid_client_report_buffer, hid_report -> ux_host_class_hid_report_byte_length); /* Use case of memcpy is verified. */
}
else
{
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_resources_free.c b/common/usbx_host_classes/src/ux_host_class_hid_resources_free.c
index 2cbacad..b04bb2e 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_resources_free.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_resources_free.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_resources_free PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hid_resources_free(UX_HOST_CLASS_HID *hid)
diff --git a/common/usbx_host_classes/src/ux_host_class_hid_transfer_request_completed.c b/common/usbx_host_classes/src/ux_host_class_hid_transfer_request_completed.c
index 6082c78..b4f8bb4 100644
--- a/common/usbx_host_classes/src/ux_host_class_hid_transfer_request_completed.c
+++ b/common/usbx_host_classes/src/ux_host_class_hid_transfer_request_completed.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hid_transfer_request_completed PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hid_transfer_request_completed(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_activate.c b/common/usbx_host_classes/src/ux_host_class_hub_activate.c
index af25734..404c2dd 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_activate(UX_HOST_CLASS_COMMAND *command)
@@ -87,11 +91,13 @@ UX_HOST_CLASS_HUB *hub;
UINT status;
+#if UX_MAX_DEVICES > 1
/* We need to make sure that the enumeration thread knows about at least
one active HUB instance and the function to call when the thread
is awaken. */
_ux_system_host -> ux_system_host_enum_hub_function = _ux_host_class_hub_change_detect;
-
+#endif
+
/* The HUB is always activated by the device descriptor and not the
instance descriptor. */
device = (UX_DEVICE *) command -> ux_host_class_command_container;
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_change_detect.c b/common/usbx_host_classes/src/ux_host_class_hub_change_detect.c
index 265a1ec..a2b4bcc 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_change_detect.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_change_detect.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_change_detect PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hub_change_detect(VOID)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_change_process.c b/common/usbx_host_classes/src/ux_host_class_hub_change_process.c
index 6fd50c5..b4a2acc 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_change_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_change_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_change_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_change_process(UX_HOST_CLASS_HUB *hub)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_configure.c b/common/usbx_host_classes/src/ux_host_class_hub_configure.c
index f5efdf5..111bbd2 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_configure(UX_HOST_CLASS_HUB *hub)
@@ -83,10 +87,12 @@ UINT _ux_host_class_hub_configure(UX_HOST_CLASS_HUB *hub)
UINT status;
UX_CONFIGURATION *configuration;
UX_DEVICE *device;
-UX_DEVICE *parent_device;
UX_ENDPOINT *control_endpoint;
UCHAR *device_status_data;
UX_TRANSFER *transfer_request;
+#if UX_MAX_DEVICES > 1
+UX_DEVICE *parent_device;
+#endif
/* A HUB normally has one configuration. So retrieve the 1st configuration
@@ -96,9 +102,6 @@ UX_TRANSFER *transfer_request;
/* Get the device container for this configuration. */
device = configuration -> ux_configuration_device;
- /* Get the parent container for this device. */
- parent_device = device -> ux_device_parent;
-
/* To find the true source of the HUB power source, we need to do a GET_STATUS of
the device. */
control_endpoint = &device -> ux_device_control_endpoint;
@@ -148,12 +151,16 @@ UX_TRANSFER *transfer_request;
/* Return an error. */
return(UX_CONNECTION_INCOMPATIBLE);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the HUB power source and check the parent power source for
incompatible connections. */
if (hub -> ux_host_class_hub_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
{
+ /* Get the parent container for this device. */
+ parent_device = device -> ux_device_parent;
+
/* If the device is NULL, the parent is the root HUB and we don't have to worry
if the parent is not the root HUB, check for its power source. */
if ((parent_device != UX_NULL) && (parent_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED))
@@ -168,7 +175,8 @@ UX_TRANSFER *transfer_request;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_deactivate.c b/common/usbx_host_classes/src/ux_host_class_hub_deactivate.c
index ed4ef2d..d3d46fc 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_deactivate(UX_HOST_CLASS_COMMAND *command)
@@ -89,7 +93,7 @@ UINT port_index;
hub = (UX_HOST_CLASS_HUB *) command -> ux_host_class_command_instance;
/* Get the HCD used by this instance. */
- hcd = hub -> ux_host_class_hub_device -> ux_device_hcd;
+ hcd = UX_DEVICE_HCD_GET(hub -> ux_host_class_hub_device);
/* The HUB is being shut down. */
hub -> ux_host_class_hub_state = UX_HOST_CLASS_INSTANCE_SHUTDOWN;
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_descriptor_get.c b/common/usbx_host_classes/src/ux_host_class_hub_descriptor_get.c
index 449e8a6..2001386 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_descriptor_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_descriptor_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_descriptor_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_descriptor_get(UX_HOST_CLASS_HUB *hub)
@@ -79,7 +83,9 @@ UCHAR *descriptor;
UX_ENDPOINT *control_endpoint;
UX_TRANSFER *transfer_request;
UINT status;
+#if UX_MAX_DEVICES > 1
ULONG port_index;
+#endif
/* We need to get the default control endpoint transfer request pointer. */
@@ -110,6 +116,7 @@ ULONG port_index;
if (transfer_request -> ux_transfer_request_actual_length == UX_HUB_DESCRIPTOR_LENGTH)
{
+#if UX_MAX_DEVICES > 1
/* Parse the device descriptor and create the local descriptor. */
_ux_utility_descriptor_parse(descriptor, _ux_system_hub_descriptor_structure, UX_HUB_DESCRIPTOR_ENTRIES,
(UCHAR *) &hub -> ux_host_class_hub_descriptor);
@@ -159,6 +166,7 @@ ULONG port_index;
/* We should never get here. In this case the protocol value of the HUB is illegal. */
status = UX_DESCRIPTOR_CORRUPTED;
}
+#endif /* #if UX_MAX_DEVICES > 1 */
}
else
{
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_entry.c b/common/usbx_host_classes/src/ux_host_class_hub_entry.c
index 991612a..d6fbccb 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used query usage of device */
+/* ClassSubclassProtocol, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_entry(UX_HOST_CLASS_COMMAND *command)
@@ -85,7 +89,7 @@ UINT status;
/* The query command is used to let the stack enumeration process know if we want to own
this device or not. */
- if ((command -> ux_host_class_command_usage == UX_HOST_CLASS_COMMAND_USAGE_CSP) &&
+ if ((command -> ux_host_class_command_usage == UX_HOST_CLASS_COMMAND_USAGE_DCSP) &&
(command -> ux_host_class_command_class == UX_HOST_CLASS_HUB_CLASS))
return(UX_SUCCESS);
else
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_feature.c b/common/usbx_host_classes/src/ux_host_class_hub_feature.c
index fbf64d3..1e73979 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_feature.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_feature.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_feature PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_feature(UX_HOST_CLASS_HUB *hub, UINT port, UINT command, UINT function)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_hub_change_process.c b/common/usbx_host_classes/src/ux_host_class_hub_hub_change_process.c
index b386998..8409624 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_hub_change_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_hub_change_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_hub_change_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_hub_change_process(UX_HOST_CLASS_HUB *hub)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_interrupt_endpoint_start.c b/common/usbx_host_classes/src/ux_host_class_hub_interrupt_endpoint_start.c
index e82a0f2..4e5a076 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_interrupt_endpoint_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_interrupt_endpoint_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_interrupt_endpoint_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_interrupt_endpoint_start(UX_HOST_CLASS_HUB *hub)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_port_change_connection_process.c b/common/usbx_host_classes/src/ux_host_class_hub_port_change_connection_process.c
index 20a8831..fb4f7bf 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_port_change_connection_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_port_change_connection_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_port_change_connection_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hub_port_change_connection_process(UX_HOST_CLASS_HUB *hub, UINT port, UINT port_status)
@@ -90,7 +94,7 @@ USHORT local_port_change;
UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HUB_PORT_CHANGE_CONNECTION_PROCESS, hub, port, port_status, 0, UX_TRACE_HOST_CLASS_EVENTS, 0, 0)
/* Get the HCD used by this instance. */
- hcd = hub -> ux_host_class_hub_device -> ux_device_hcd;
+ hcd = UX_DEVICE_HCD_GET(hub -> ux_host_class_hub_device);
/* If there is a device attached on this HUB, there is a new device and it should
be enumerated. */
@@ -160,7 +164,7 @@ USHORT local_port_change;
_ux_utility_delay_ms(UX_HOST_CLASS_HUB_ENUMERATION_RESET_RECOVERY_DELAY);
/* Perform the device creation. */
- status = _ux_host_stack_new_device_create(hub -> ux_host_class_hub_device -> ux_device_hcd,
+ status = _ux_host_stack_new_device_create(UX_DEVICE_HCD_GET(hub -> ux_host_class_hub_device),
hub -> ux_host_class_hub_device,
port, device_speed, port_power);
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_port_change_enable_process.c b/common/usbx_host_classes/src/ux_host_class_hub_port_change_enable_process.c
index 7a056e2..44c23fd 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_port_change_enable_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_port_change_enable_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_port_change_enable_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hub_port_change_enable_process(UX_HOST_CLASS_HUB *hub, UINT port, UINT port_status)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_port_change_over_current_process.c b/common/usbx_host_classes/src/ux_host_class_hub_port_change_over_current_process.c
index ad198bd..30c9ade 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_port_change_over_current_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_port_change_over_current_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_port_change_over_current_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hub_port_change_over_current_process(UX_HOST_CLASS_HUB *hub, UINT port, UINT port_status)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_port_change_process.c b/common/usbx_host_classes/src/ux_host_class_hub_port_change_process.c
index 246db51..15d66af 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_port_change_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_port_change_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_port_change_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,6 +76,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_port_change_process(UX_HOST_CLASS_HUB *hub, UINT port)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_port_change_reset_process.c b/common/usbx_host_classes/src/ux_host_class_hub_port_change_reset_process.c
index 733fbe8..3448793 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_port_change_reset_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_port_change_reset_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_port_change_reset_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hub_port_change_reset_process(UX_HOST_CLASS_HUB *hub, UINT port, UINT port_status)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_port_change_suspend_process.c b/common/usbx_host_classes/src/ux_host_class_hub_port_change_suspend_process.c
index 270c954..7409358 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_port_change_suspend_process.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_port_change_suspend_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_port_change_suspend_process PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hub_port_change_suspend_process(UX_HOST_CLASS_HUB *hub, UINT port, UINT port_status)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_port_reset.c b/common/usbx_host_classes/src/ux_host_class_hub_port_reset.c
index 63106ba..3931eea 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_port_reset.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_port_reset.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_port_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_port_reset(UX_HOST_CLASS_HUB *hub, UINT port)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_ports_power.c b/common/usbx_host_classes/src/ux_host_class_hub_ports_power.c
index a10e458..ddc1127 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_ports_power.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_ports_power.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_ports_power PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -81,6 +81,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_ports_power(UX_HOST_CLASS_HUB *hub)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_status_get.c b/common/usbx_host_classes/src/ux_host_class_hub_status_get.c
index fb165af..d942346 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_status_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_status_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_status_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_hub_status_get(UX_HOST_CLASS_HUB *hub, UINT port, USHORT *port_status, USHORT *port_change)
diff --git a/common/usbx_host_classes/src/ux_host_class_hub_transfer_request_completed.c b/common/usbx_host_classes/src/ux_host_class_hub_transfer_request_completed.c
index 6addc55..ccdb2e5 100644
--- a/common/usbx_host_classes/src/ux_host_class_hub_transfer_request_completed.c
+++ b/common/usbx_host_classes/src/ux_host_class_hub_transfer_request_completed.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_hub_transfer_request_completed PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,6 +76,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_hub_transfer_request_completed(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_activate.c b/common/usbx_host_classes/src/ux_host_class_pima_activate.c
index 4c94a23..bbeda72 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_command.c b/common/usbx_host_classes/src/ux_host_class_pima_command.c
index 2e63ddd..7f8bd65 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_command.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_command.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_command PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_command(UX_HOST_CLASS_PIMA *pima, UX_HOST_CLASS_PIMA_COMMAND *command,
@@ -136,7 +139,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -230,7 +233,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_configure.c b/common/usbx_host_classes/src/ux_host_class_pima_configure.c
index 90411f9..2b2fc05 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_configure(UX_HOST_CLASS_PIMA *pima)
@@ -77,7 +81,9 @@ UINT _ux_host_class_pima_configure(UX_HOST_CLASS_PIMA *pima)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -99,7 +105,8 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the pima power source and check the parent power source for
incompatible connections. */
if (pima -> ux_host_class_pima_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -122,7 +129,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_deactivate.c b/common/usbx_host_classes/src/ux_host_class_pima_deactivate.c
index 09fb56a..7fd22aa 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_device_info_get.c b/common/usbx_host_classes/src/ux_host_class_pima_device_info_get.c
index 5aa9be2..7d70474 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_device_info_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_device_info_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_device_info_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_device_info_get(UX_HOST_CLASS_PIMA *pima,
@@ -144,7 +148,7 @@ UINT status;
{
/* Copy that string into the object description field. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_vendor_extension_desc, device_pointer, unicode_string_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_vendor_extension_desc, device_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += unicode_string_length + 1;
@@ -170,7 +174,7 @@ UINT status;
{
/* Copy the array of supported operations. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_operations_supported, device_pointer, array_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_operations_supported, device_pointer, array_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += array_length;
@@ -190,7 +194,7 @@ UINT status;
{
/* Copy the array of events supported. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_events_supported, device_pointer, array_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_events_supported, device_pointer, array_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += array_length;
@@ -210,7 +214,7 @@ UINT status;
{
/* Copy the array of device properties. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_properties_supported, device_pointer, array_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_properties_supported, device_pointer, array_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += array_length;
@@ -230,7 +234,7 @@ UINT status;
{
/* Copy the array of capture formats. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_capture_formats, device_pointer, array_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_capture_formats, device_pointer, array_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += array_length;
@@ -250,7 +254,7 @@ UINT status;
{
/* Copy the array of supported operations. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_image_formats, device_pointer, array_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_image_formats, device_pointer, array_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += array_length;
@@ -270,7 +274,7 @@ UINT status;
{
/* Copy that string into the manufacturer field. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_manufacturer, device_pointer, unicode_string_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_manufacturer, device_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += unicode_string_length + 1;
@@ -290,7 +294,7 @@ UINT status;
{
/* Copy that string into the model date field. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_model, device_pointer, unicode_string_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_model, device_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += unicode_string_length + 1;
@@ -310,7 +314,7 @@ UINT status;
{
/* Copy that string into the version field. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_version, device_pointer, unicode_string_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_version, device_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
device_pointer += unicode_string_length + 1;
@@ -329,7 +333,7 @@ UINT status;
if (status == UX_SUCCESS)
/* Copy that string into the serial number field. */
- _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_serial_number, device_pointer, unicode_string_length);
+ _ux_utility_memory_copy(pima_device -> ux_host_class_pima_device_serial_number, device_pointer, unicode_string_length); /* Use case of memcpy is verified. */
else
{
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_device_reset.c b/common/usbx_host_classes/src/ux_host_class_pima_device_reset.c
index 24cc876..8d9268c 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_device_reset.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_device_reset.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_device_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -64,6 +64,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_device_reset(UX_HOST_CLASS_PIMA *pima)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_pima_endpoints_get.c
index abbd09e..0a8c499 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_endpoints_get(UX_HOST_CLASS_PIMA *pima)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_entry.c b/common/usbx_host_classes/src/ux_host_class_pima_entry.c
index 909931a..83b57e3 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_notification.c b/common/usbx_host_classes/src/ux_host_class_pima_notification.c
index e7d60a3..5e735a1 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_notification.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_notification.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_notification PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_pima_notification(UX_TRANSFER *transfer_request)
@@ -127,7 +131,7 @@ UX_HOST_CLASS_PIMA_EVENT pima_event;
/* We copy the current payload into our event notification buffer. */
_ux_utility_memory_copy(pima -> ux_host_class_pima_event_buffer_current_offset, transfer_request -> ux_transfer_request_data_pointer,
- transfer_request -> ux_transfer_request_actual_length);
+ transfer_request -> ux_transfer_request_actual_length); /* Use case of memcpy is verified. */
/* Set the new offset address. */
pima -> ux_host_class_pima_event_buffer_current_offset += transfer_request -> ux_transfer_request_actual_length;
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_num_objects_get.c b/common/usbx_host_classes/src/ux_host_class_pima_num_objects_get.c
index 1131219..9fd1ada 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_num_objects_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_num_objects_get.c
@@ -34,8 +34,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_host_class_pima_num_object_get PORTABLE C */
-/* 6.0 */
+/* _ux_host_class_pima_num_objects_get PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_num_objects_get(UX_HOST_CLASS_PIMA *pima,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_close.c b/common/usbx_host_classes/src/ux_host_class_pima_object_close.c
index d6843d7..17dc49b 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_close.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_close.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_close PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_close(UX_HOST_CLASS_PIMA *pima,
@@ -140,7 +143,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -182,7 +185,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_copy.c b/common/usbx_host_classes/src/ux_host_class_pima_object_copy.c
index b97375f..3016f1d 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_copy.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_copy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_copy PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_copy(UX_HOST_CLASS_PIMA *pima,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_delete.c b/common/usbx_host_classes/src/ux_host_class_pima_object_delete.c
index e7341f3..a0bf7fe 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_delete.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_delete.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_delete PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_delete(UX_HOST_CLASS_PIMA *pima,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_get.c b/common/usbx_host_classes/src/ux_host_class_pima_object_get.c
index 21c66cd..c86686c 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_get(UX_HOST_CLASS_PIMA *pima,
@@ -174,7 +179,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS || transfer_request -> ux_transfer_request_completion_code != UX_SUCCESS)
@@ -234,7 +239,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS || transfer_request -> ux_transfer_request_completion_code != UX_SUCCESS)
@@ -269,7 +274,7 @@ UINT status;
/* We need to skip the header. Copying the necessary partial memory only. */
_ux_utility_memory_copy(object_buffer, ptp_payload + UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE,
- transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE);
+ transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE); /* Use case of memcpy is verified. */
/* Get the size of the entire data payload to be expected in this object transfer (data + header). If the size is on a boundary
the pima protocol demands that the last packet is a ZLP. */
@@ -357,7 +362,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS || transfer_request -> ux_transfer_request_completion_code != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_handles_get.c b/common/usbx_host_classes/src/ux_host_class_pima_object_handles_get.c
index 447a7dd..353ec6e 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_handles_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_handles_get.c
@@ -34,8 +34,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_host_class_pima_storage_ids_get PORTABLE C */
-/* 6.0 */
+/* _ux_host_class_pima_object_handles_get PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -78,6 +78,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_handles_get(UX_HOST_CLASS_PIMA *pima, UX_HOST_CLASS_PIMA_SESSION *pima_session,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_info_get.c b/common/usbx_host_classes/src/ux_host_class_pima_object_info_get.c
index dc52b40..73974c8 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_info_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_info_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_info_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_info_get(UX_HOST_CLASS_PIMA *pima,
@@ -146,7 +150,7 @@ UINT status;
{
/* Copy that string into the object description field. */
- _ux_utility_memory_copy(object -> ux_host_class_pima_object_filename, object_pointer, unicode_string_length);
+ _ux_utility_memory_copy(object -> ux_host_class_pima_object_filename, object_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
object_pointer += unicode_string_length;
@@ -166,7 +170,7 @@ UINT status;
{
/* Copy that string into the capture date field. */
- _ux_utility_memory_copy(object -> ux_host_class_pima_object_capture_date, object_pointer, unicode_string_length);
+ _ux_utility_memory_copy(object -> ux_host_class_pima_object_capture_date, object_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
object_pointer += unicode_string_length;
@@ -186,7 +190,7 @@ UINT status;
{
/* Copy that string into the modification date field. */
- _ux_utility_memory_copy(object -> ux_host_class_pima_object_modification_date, object_pointer, unicode_string_length);
+ _ux_utility_memory_copy(object -> ux_host_class_pima_object_modification_date, object_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
object_pointer += unicode_string_length;
@@ -206,7 +210,7 @@ UINT status;
{
/* Copy that string into the keywords field. */
- _ux_utility_memory_copy(object -> ux_host_class_pima_object_keywords, object_pointer, unicode_string_length);
+ _ux_utility_memory_copy(object -> ux_host_class_pima_object_keywords, object_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Make the object closed. */
object -> ux_host_class_pima_object_state = UX_HOST_CLASS_PIMA_OBJECT_STATE_CLOSED;
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_info_send.c b/common/usbx_host_classes/src/ux_host_class_pima_object_info_send.c
index 863090a..1d375dd 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_info_send.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_info_send.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_info_send PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_info_send(UX_HOST_CLASS_PIMA *pima,
@@ -155,7 +159,7 @@ UINT status;
{
/* Copy that string into the object description field. */
- _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_filename, unicode_string_length);
+ _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_filename, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
object_pointer += unicode_string_length;
@@ -175,7 +179,7 @@ UINT status;
{
/* Copy that string into the capture date field. */
- _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_capture_date, unicode_string_length);
+ _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_capture_date, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
object_pointer += unicode_string_length;
@@ -195,7 +199,7 @@ UINT status;
{
/* Copy that string into the modification date field. */
- _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_modification_date, unicode_string_length);
+ _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_modification_date, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
object_pointer += unicode_string_length;
@@ -215,7 +219,7 @@ UINT status;
{
/* Copy that string into the keywords field. */
- _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_keywords, unicode_string_length);
+ _ux_utility_memory_copy(object_pointer, object -> ux_host_class_pima_object_keywords, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the next field. */
object_pointer += unicode_string_length;
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_move.c b/common/usbx_host_classes/src/ux_host_class_pima_object_move.c
index 46768a2..fd6f4d7 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_move.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_move.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_move PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_move(UX_HOST_CLASS_PIMA *pima,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_open.c b/common/usbx_host_classes/src/ux_host_class_pima_object_open.c
index b8e0569..75d8560 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_open.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_open.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_open PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_open(UX_HOST_CLASS_PIMA *pima,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_send.c b/common/usbx_host_classes/src/ux_host_class_pima_object_send.c
index a2cf18c..de8b8e0 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_send.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_send.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_send PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -78,6 +78,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_send(UX_HOST_CLASS_PIMA *pima,
@@ -163,7 +168,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -233,7 +238,7 @@ UINT status;
/* We need to skip the header. Copying the necessary partial memory only. */
_ux_utility_memory_copy(ptp_payload + UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE, object_buffer,
- requested_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE);
+ requested_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE); /* Use case of memcpy is verified. */
/* Update the offset. */
object -> ux_host_class_pima_object_offset += requested_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE;
@@ -256,7 +261,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -324,7 +329,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_object_transfer_abort.c b/common/usbx_host_classes/src/ux_host_class_pima_object_transfer_abort.c
index 1663b0d..4216741 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_object_transfer_abort.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_object_transfer_abort.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_object_transfer_abort PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_object_transfer_abort(UX_HOST_CLASS_PIMA *pima,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_read.c b/common/usbx_host_classes/src/ux_host_class_pima_read.c
index d775fcd..ee272a3 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_read.c
@@ -30,12 +30,16 @@
#include "ux_host_stack.h"
+#if UX_SLAVE_REQUEST_DATA_MAX_LENGTH < UX_HOST_CLASS_PIMA_CONTAINER_SIZE
+#error UX_SLAVE_REQUEST_DATA_MAX_LENGTH too small, please check
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -78,6 +82,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_read(UX_HOST_CLASS_PIMA *pima, UCHAR *data_pointer,
@@ -117,7 +126,7 @@ ULONG payload_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -171,7 +180,7 @@ ULONG payload_length;
/* Copying the necessary partial memory. */
_ux_utility_memory_copy(data_pointer, ptp_payload + UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE,
- transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE);
+ transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE); /* Use case of memcpy is verified. */
/* Adjust the data payload pointer. */
data_pointer += (transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE);
@@ -202,7 +211,7 @@ ULONG payload_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -257,7 +266,7 @@ ULONG payload_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_request_cancel.c b/common/usbx_host_classes/src/ux_host_class_pima_request_cancel.c
index 892ca76..728c2da 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_request_cancel.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_request_cancel.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_request_cancel PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_request_cancel(UX_HOST_CLASS_PIMA *pima)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_session_close.c b/common/usbx_host_classes/src/ux_host_class_pima_session_close.c
index 8f8ed6a..e982f8d 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_session_close.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_session_close.c
@@ -34,8 +34,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_host_class_pima_session_close PORTABLE C */
-/* 6.0 */
+/* _ux_host_class_pima_session_close PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_session_close(UX_HOST_CLASS_PIMA *pima, UX_HOST_CLASS_PIMA_SESSION *pima_session)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_session_open.c b/common/usbx_host_classes/src/ux_host_class_pima_session_open.c
index e72a481..1964c96 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_session_open.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_session_open.c
@@ -34,8 +34,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_host_class_pima_session_open PORTABLE C */
-/* 6.0 */
+/* _ux_host_class_pima_session_open PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_session_open(UX_HOST_CLASS_PIMA *pima, UX_HOST_CLASS_PIMA_SESSION *pima_session)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_storage_ids_get.c b/common/usbx_host_classes/src/ux_host_class_pima_storage_ids_get.c
index ace2003..72798be 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_storage_ids_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_storage_ids_get.c
@@ -36,7 +36,7 @@ UX_HOST_CLASS_PIMA_STORAGE_IDS_LENGTH_ASSERT
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_storage_ids_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@ UX_HOST_CLASS_PIMA_STORAGE_IDS_LENGTH_ASSERT
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_storage_ids_get(UX_HOST_CLASS_PIMA *pima, UX_HOST_CLASS_PIMA_SESSION *pima_session,
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_storage_info_get.c b/common/usbx_host_classes/src/ux_host_class_pima_storage_info_get.c
index 3f60e0a..d073e2b 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_storage_info_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_storage_info_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_storage_info_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_storage_info_get(UX_HOST_CLASS_PIMA *pima,
@@ -135,7 +139,7 @@ ULONG unicode_string_length;
unicode_string_length = (ULONG) *storage_pointer ;
/* Copy that string into the storage description field. */
- _ux_utility_memory_copy(storage -> ux_host_class_pima_storage_description, storage_pointer, unicode_string_length);
+ _ux_utility_memory_copy(storage -> ux_host_class_pima_storage_description, storage_pointer, unicode_string_length); /* Use case of memcpy is verified. */
/* Point to the volume label. */
storage_pointer = storage_buffer + UX_HOST_CLASS_PIMA_STORAGE_VARIABLE_OFFSET + unicode_string_length;
@@ -144,7 +148,7 @@ ULONG unicode_string_length;
unicode_string_length = (ULONG) *storage_pointer ;
/* Copy that string into the storage volume label field. */
- _ux_utility_memory_copy(storage -> ux_host_class_pima_storage_description, storage_pointer, unicode_string_length);
+ _ux_utility_memory_copy(storage -> ux_host_class_pima_storage_volume_label, storage_pointer, unicode_string_length); /* Use case of memcpy is verified. */
}
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_thumb_get.c b/common/usbx_host_classes/src/ux_host_class_pima_thumb_get.c
index 457aa87..dbdbc26 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_thumb_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_thumb_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_thumb_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,6 +76,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_thumb_get(UX_HOST_CLASS_PIMA *pima,
@@ -172,7 +177,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -228,7 +233,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -271,7 +276,7 @@ UINT status;
/* We need to skip the header. Copying the necessary partial memory only. */
_ux_utility_memory_copy(thumb_buffer, ptp_payload + UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE,
- transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE);
+ transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE); /* Use case of memcpy is verified. */
/* Update the actual length. */
*thumb_actual_length = transfer_request -> ux_transfer_request_actual_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE;
@@ -319,7 +324,7 @@ UINT status;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_pima_write.c b/common/usbx_host_classes/src/ux_host_class_pima_write.c
index 2c464d8..60129e6 100644
--- a/common/usbx_host_classes/src/ux_host_class_pima_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_pima_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_pima_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,11 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_pima_write(UX_HOST_CLASS_PIMA *pima, UCHAR *data_pointer,
@@ -140,7 +145,7 @@ ULONG payload_length;
/* Add the data payload to fill that container. */
_ux_utility_memory_copy(ptp_payload + UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE, data_pointer,
- requested_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE);
+ requested_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE); /* Use case of memcpy is verified. */
/* Initialize the transfer of that container. */
transfer_request -> ux_transfer_request_requested_length = requested_length;
@@ -153,7 +158,7 @@ ULONG payload_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -212,7 +217,7 @@ ULONG payload_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -267,7 +272,7 @@ ULONG payload_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PIMA_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_activate.c b/common/usbx_host_classes/src/ux_host_class_printer_activate.c
index 2cc8787..c23eefc 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_configure.c b/common/usbx_host_classes/src/ux_host_class_printer_configure.c
index 00b7d1d..1069d47 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_configure(UX_HOST_CLASS_PRINTER *printer)
@@ -76,7 +80,9 @@ UINT _ux_host_class_printer_configure(UX_HOST_CLASS_PRINTER *printer)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -98,7 +104,8 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the printer power source and check the parent power source for
incompatible connections. */
if (printer -> ux_host_class_printer_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -121,7 +128,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_deactivate.c b/common/usbx_host_classes/src/ux_host_class_printer_deactivate.c
index 1327c57..bfe648b 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_printer_endpoints_get.c
index 6e86543..ba8114a 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_endpoints_get(UX_HOST_CLASS_PRINTER *printer)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_entry.c b/common/usbx_host_classes/src/ux_host_class_printer_entry.c
index ee7fa18..8ee7c02 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_name_get.c b/common/usbx_host_classes/src/ux_host_class_printer_name_get.c
index 74d2e7a..073ffc7 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_name_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_name_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_name_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_name_get(UX_HOST_CLASS_PRINTER *printer)
@@ -163,7 +167,7 @@ UINT printer_name_length;
{
/* Use the generic USB printer name. */
- _ux_utility_memory_copy(printer -> ux_host_class_printer_name, UX_HOST_CLASS_PRINTER_GENERIC_NAME, 11);
+ _ux_utility_memory_copy(printer -> ux_host_class_printer_name, UX_HOST_CLASS_PRINTER_GENERIC_NAME, 11); /* Use case of memcpy is verified. */
}
else
{
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_read.c b/common/usbx_host_classes/src/ux_host_class_printer_read.c
index 42a1076..122bfb9 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,6 +76,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_read (UX_HOST_CLASS_PRINTER *printer, UCHAR *data_pointer,
@@ -156,7 +159,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer_request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PRINTER_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PRINTER_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_soft_reset.c b/common/usbx_host_classes/src/ux_host_class_printer_soft_reset.c
index 450ce8d..3058896 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_soft_reset.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_soft_reset.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_soft_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_soft_reset(UX_HOST_CLASS_PRINTER *printer)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_status_get.c b/common/usbx_host_classes/src/ux_host_class_printer_status_get.c
index da8f071..164490c 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_status_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_status_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_status_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_status_get(UX_HOST_CLASS_PRINTER *printer, ULONG *printer_status)
diff --git a/common/usbx_host_classes/src/ux_host_class_printer_write.c b/common/usbx_host_classes/src/ux_host_class_printer_write.c
index 8fb6c6f..52f4c73 100644
--- a/common/usbx_host_classes/src/ux_host_class_printer_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_printer_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_printer_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_printer_write(UX_HOST_CLASS_PRINTER *printer, UCHAR * data_pointer,
@@ -135,7 +138,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PRINTER_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PRINTER_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_activate.c b/common/usbx_host_classes/src/ux_host_class_prolific_activate.c
index 44883af..b8d26a6 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_command.c b/common/usbx_host_classes/src/ux_host_class_prolific_command.c
index 8d8551f..c6d7f1e 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_command.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_command.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_command PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_command(UX_HOST_CLASS_PROLIFIC *prolific, ULONG command,
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_configure.c b/common/usbx_host_classes/src/ux_host_class_prolific_configure.c
index 576aac0..cdb7909 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_configure(UX_HOST_CLASS_PROLIFIC *prolific)
@@ -77,7 +81,9 @@ UINT _ux_host_class_prolific_configure(UX_HOST_CLASS_PROLIFIC *prolific)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -99,7 +105,8 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the prolific power source and check the parent power source for
incompatible connections. */
if (prolific -> ux_host_class_prolific_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -122,7 +129,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_deactivate.c b/common/usbx_host_classes/src/ux_host_class_prolific_deactivate.c
index 9b168a1..1a3e68a 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_prolific_endpoints_get.c
index f4d6463..584f90d 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_endpoints_get(UX_HOST_CLASS_PROLIFIC *prolific)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_entry.c b/common/usbx_host_classes/src/ux_host_class_prolific_entry.c
index 71e72d9..fc84bac 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_ioctl.c b/common/usbx_host_classes/src/ux_host_class_prolific_ioctl.c
index 6bcdb94..e1fbaff 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_ioctl.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_ioctl.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_ioctl PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_ioctl(UX_HOST_CLASS_PROLIFIC *prolific, ULONG ioctl_function,
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_read.c b/common/usbx_host_classes/src/ux_host_class_prolific_read.c
index 37f2a0e..cde7c27 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_read (UX_HOST_CLASS_PROLIFIC *prolific, UCHAR *data_pointer,
@@ -128,7 +131,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer_request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PROLIFIC_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PROLIFIC_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_reception_callback.c b/common/usbx_host_classes/src/ux_host_class_prolific_reception_callback.c
index edeff6c..b06470c 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_reception_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_reception_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_reception_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_prolific_reception_callback (UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_reception_start.c b/common/usbx_host_classes/src/ux_host_class_prolific_reception_start.c
index d930320..65041c5 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_reception_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_reception_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_reception_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_reception_start (UX_HOST_CLASS_PROLIFIC *prolific,
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_reception_stop.c b/common/usbx_host_classes/src/ux_host_class_prolific_reception_stop.c
index e3bbae3..f73d35c 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_reception_stop.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_reception_stop.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_reception_stop PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_reception_stop (UX_HOST_CLASS_PROLIFIC *prolific,
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_setup.c b/common/usbx_host_classes/src/ux_host_class_prolific_setup.c
index 1c5e76d..8d4a91e 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_setup.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_setup.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_setup PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_setup(UX_HOST_CLASS_PROLIFIC *prolific)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_transfer_request_completed.c b/common/usbx_host_classes/src/ux_host_class_prolific_transfer_request_completed.c
index 5bc4a72..8c3a8cb 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_transfer_request_completed.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_transfer_request_completed.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_transfer_request_completed PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_prolific_transfer_request_completed(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_prolific_write.c b/common/usbx_host_classes/src/ux_host_class_prolific_write.c
index 15f8bc0..ce43ca5 100644
--- a/common/usbx_host_classes/src/ux_host_class_prolific_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_prolific_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_prolific_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_prolific_write(UX_HOST_CLASS_PROLIFIC *prolific, UCHAR *data_pointer,
@@ -127,7 +130,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_PROLIFIC_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_PROLIFIC_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_activate.c b/common/usbx_host_classes/src/ux_host_class_storage_activate.c
index d7fb0d2..4a6be49 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_activate(UX_HOST_CLASS_COMMAND *command)
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 3892fc3..c056a17 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.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_storage_cbw_initialize(UX_HOST_CLASS_STORAGE *storage, UINT direction,
@@ -103,7 +107,7 @@ UCHAR *cbw;
*(cbw + UX_HOST_CLASS_STORAGE_CBW_CB_LENGTH) = (UCHAR)command_length;
/* Reset the SCSI command block. */
- _ux_utility_memory_set(cbw + UX_HOST_CLASS_STORAGE_CBW_CB, 0, (ULONG) command_length);
+ _ux_utility_memory_set(cbw + UX_HOST_CLASS_STORAGE_CBW_CB, 0, (ULONG) command_length); /* Use case of memset is verified. */
/* Return to caller. */
return;
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_configure.c b/common/usbx_host_classes/src/ux_host_class_storage_configure.c
index 62a147a..4bf84bb 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_configure(UX_HOST_CLASS_STORAGE *storage)
@@ -76,7 +80,9 @@ UINT _ux_host_class_storage_configure(UX_HOST_CLASS_STORAGE *storage)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -100,7 +106,8 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the storage device power source and check the parent power source for
incompatible connections. */
if (storage -> ux_host_class_storage_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -123,7 +130,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_deactivate.c b/common/usbx_host_classes/src/ux_host_class_storage_deactivate.c
index 7ab5b0a..4d13624 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -56,7 +56,7 @@
/* */
/* CALLS */
/* */
-/* fx_media_close Close media */
+/* ux_media_close Close media */
/* _ux_host_stack_endpoint_transfer_abort Abort transfer request */
/* _ux_host_stack_class_instance_destroy Destroy class instance */
/* _ux_utility_memory_free Free memory block */
@@ -73,27 +73,38 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, used UX_ */
+/* things instead of FX_ */
+/* things directly, used host */
+/* class extension pointer for */
+/* class specific structured */
+/* data, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_deactivate(UX_HOST_CLASS_COMMAND *command)
{
UX_HOST_CLASS_STORAGE *storage;
-UINT media_index;
-FX_MEDIA *media;
UX_HOST_CLASS_STORAGE_MEDIA *storage_media;
-UX_HOST_CLASS *class;
+UX_HOST_CLASS *class_inst;
+UINT inst_index;
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+UX_MEDIA *media;
VOID *memory;
+#endif
/* Get the instance for this class. */
storage = (UX_HOST_CLASS_STORAGE *) command -> ux_host_class_command_instance;
/* We need the class container. */
- class = storage -> ux_host_class_storage_class;
-
+ class_inst = storage -> ux_host_class_storage_class;
+
/* Point the media structure to the first media in the container. */
- storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class -> ux_host_class_media;
+ storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class_inst -> ux_host_class_media;
/* The storage device is being shut down. */
storage -> ux_host_class_storage_state = UX_HOST_CLASS_INSTANCE_SHUTDOWN;
@@ -139,15 +150,17 @@ VOID *memory;
endpoints to exit properly. */
_ux_utility_thread_schedule_other(UX_THREAD_PRIORITY_ENUM);
- /* Inform FileX of the deactivation of all Media attached to this instance. */
- for (media_index = 0; media_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA; media_index++)
+
+ /* Inform UX_MEDIA (default FileX) of the deactivation of all Media attached to this instance. */
+ for (inst_index = 0; inst_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA; inst_index++)
{
- /* Get the FileX Media attached to this media. */
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ /* Get the UX_MEDIA (default FileX) attached to this media. */
media = &storage_media -> ux_host_class_storage_media;
/* Check if the media belongs to the device being removed. */
- if (((UX_HOST_CLASS_STORAGE *) media -> fx_media_driver_info) == storage)
+ if (((UX_HOST_CLASS_STORAGE *) ux_media_driver_info_get(media)) == storage)
{
/* Check if the media was properly opened. */
@@ -157,19 +170,38 @@ VOID *memory;
/* We preserve the memory used by this media. */
memory = storage_media -> ux_host_class_storage_media_memory;
- /* Ask FileX to unmount the partition. */
- fx_media_close(media);
+ /* Ask UX_MEDIA (default FileX) to unmount the partition. */
+ ux_media_close(media);
/* This device is now unmounted. */
storage_media -> ux_host_class_storage_media_status = UX_HOST_CLASS_STORAGE_MEDIA_UNMOUNTED;
/* Reset the media ID. */
- media -> fx_media_id = 0;
+ ux_media_id_set(media, 0);
- /* Free the memory block used for data transfer on behalf of FileX. */
+ /* Free the memory block used for data transfer on behalf of UX_MEDIA (default FileX). */
_ux_utility_memory_free(memory);
}
}
+#else
+
+ /* Check if the media is for this storage. */
+ if (storage_media -> ux_host_class_storage_media_storage == storage)
+ {
+
+ /* Invoke callback for media removal. */
+ if (_ux_system_host -> ux_system_host_change_function != UX_NULL)
+ {
+
+ /* Call system change function. */
+ _ux_system_host -> ux_system_host_change_function(UX_STORAGE_MEDIA_REMOVAL,
+ storage -> ux_host_class_storage_class, (VOID *) storage_media);
+ }
+
+ /* Free the storage media. */
+ storage_media -> ux_host_class_storage_media_storage = UX_NULL;
+ }
+#endif
/* Move to next entry in the media array. */
storage_media++;
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_device_initialize.c b/common/usbx_host_classes/src/ux_host_class_storage_device_initialize.c
index b2ddd55..e3798a9 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_device_initialize.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_device_initialize.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_device_initialize PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,13 +75,23 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_device_initialize(UX_HOST_CLASS_STORAGE *storage)
{
-UINT status;
-ULONG lun_index;
+UINT status;
+ULONG lun_index;
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+UX_HOST_CLASS_STORAGE_MEDIA *storage_media;
+UX_HOST_CLASS *class_inst;
+UINT inst_index;
+#endif
+
/* Check the device protocol support and initialize the transport layer. */
status = _ux_host_class_storage_device_support_check(storage);
@@ -106,6 +116,11 @@ ULONG lun_index;
The default sleep value is 2 seconds. */
_ux_utility_delay_ms(UX_HOST_CLASS_STORAGE_DEVICE_INIT_DELAY);
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ /* We need the class container. */
+ class_inst = storage -> ux_host_class_storage_class;
+#endif
+
/* Each LUN must be parsed and mounted. */
for (lun_index = 0; lun_index <= storage -> ux_host_class_storage_max_lun; lun_index++)
{
@@ -147,9 +162,11 @@ ULONG lun_index;
case UX_HOST_CLASS_STORAGE_MEDIA_OPTICAL_DISK:
case UX_HOST_CLASS_STORAGE_MEDIA_IOMEGA_CLICK:
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
/* Try to read the device media in search for a partition table or boot sector.
We are at the root of the disk, so use sector 0 as the starting point. */
_ux_host_class_storage_media_mount(storage, 0);
+#endif
break;
case UX_HOST_CLASS_STORAGE_MEDIA_CDROM:
@@ -160,6 +177,37 @@ ULONG lun_index;
break;
}
+
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+
+ /* Find a free media slot for inserted media. */
+ storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class_inst -> ux_host_class_media;
+ for (inst_index = 0; inst_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA;
+ storage_media ++, inst_index++)
+ {
+
+ /* Skip used storage media slots. */
+ if (storage_media -> ux_host_class_storage_media_storage != UX_NULL)
+ continue;
+
+ /* Use this free storage media slot. */
+ storage_media -> ux_host_class_storage_media_storage = storage;
+
+ /* Save media information. */
+ storage_media -> ux_host_class_storage_media_lun = (UCHAR)storage -> ux_host_class_storage_lun;
+ storage_media -> ux_host_class_storage_media_sector_size = (USHORT)storage -> ux_host_class_storage_sector_size;
+ storage_media -> ux_host_class_storage_media_number_sectors = storage -> ux_host_class_storage_last_sector_number + 1;
+
+ /* Invoke callback for media insertion. */
+ if (_ux_system_host -> ux_system_host_change_function != UX_NULL)
+ {
+
+ /* Call system change function. */
+ _ux_system_host -> ux_system_host_change_function(UX_STORAGE_MEDIA_INSERTION,
+ storage -> ux_host_class_storage_class, (VOID *) storage_media);
+ }
+ }
+#endif
}
/* Some LUNs may succeed and some may fail. For simplicity's sake, we just
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_device_reset.c b/common/usbx_host_classes/src/ux_host_class_storage_device_reset.c
index 1551a73..678016f 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_device_reset.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_device_reset.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_device_reset PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_device_reset(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_device_support_check.c b/common/usbx_host_classes/src/ux_host_class_storage_device_support_check.c
index 0f95bf4..e27aef7 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_device_support_check.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_device_support_check.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_device_support_check PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_device_support_check(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_driver_entry.c b/common/usbx_host_classes/src/ux_host_class_storage_driver_entry.c
index aa478d2..5db2917 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_driver_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_driver_entry.c
@@ -30,12 +30,13 @@
#include "ux_host_stack.h"
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_driver_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +73,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_storage_driver_entry(FX_MEDIA *media)
@@ -212,3 +217,4 @@ UX_HOST_CLASS_STORAGE_MEDIA *storage_media;
/* Unprotect thread reentry to this instance. */
_ux_utility_semaphore_put(&storage -> ux_host_class_storage_semaphore);
}
+#endif /* !defined(UX_HOST_CLASS_STORAGE_NO_FILEX) */
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_storage_endpoints_get.c
index 0224a89..616edb3 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_endpoints_get(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_entry.c b/common/usbx_host_classes/src/ux_host_class_storage_entry.c
index 863c292..d9af70a 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_entry.c
@@ -36,7 +36,7 @@ UX_COMPILE_TIME_ASSERT(!UX_OVERFLOW_CHECK_MULC_ULONG(sizeof(UX_HOST_CLASS_STORAG
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -64,7 +64,8 @@ UX_COMPILE_TIME_ASSERT(!UX_OVERFLOW_CHECK_MULC_ULONG(sizeof(UX_HOST_CLASS_STORAG
/* _ux_host_class_storage_deactivate Deactivate storage class */
/* _ux_utility_memory_allocate Allocate memory block */
/* _ux_utility_memory_free Free memory block */
-/* _ux_utility_thread_create Create storage class thread */
+/* _ux_utility_thread_create Create storage class thread */
+/* _ux_utility_thread_delete Delete storage class thread */
/* */
/* CALLED BY */
/* */
@@ -75,12 +76,24 @@ UX_COMPILE_TIME_ASSERT(!UX_OVERFLOW_CHECK_MULC_ULONG(sizeof(UX_HOST_CLASS_STORAG
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added destroy command, */
+/* used host class extension */
+/* pointer for class specific */
+/* structured data, */
+/* used UX prefix to refer to */
+/* TX symbols instead of using */
+/* them directly, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_entry(UX_HOST_CLASS_COMMAND *command)
-{
+{
+
+UINT status;
+UX_HOST_CLASS *class_inst;
+UX_HOST_CLASS_STORAGE_EXT *class_ext;
-UINT status;
/* The command request will tell us we need to do here, either a enumeration
query, an activation or a deactivation. */
@@ -103,57 +116,67 @@ UINT status;
the storage class, we have to fire up one thread for the media insertion
and acquire some memory for the media array. */
- /* Allocate some memory for the media structures used by FileX. */
- if (command -> ux_host_class_command_class_ptr -> ux_host_class_media == UX_NULL)
- {
+ /* Get class. */
+ class_inst = command -> ux_host_class_command_class_ptr;
- /* UX_HOST_CLASS_STORAGE_MAX_MEDIA*sizeof(UX_HOST_CLASS_STORAGE_MEDIA) overflow
- * is checked outside of function.
- */
- command -> ux_host_class_command_class_ptr -> ux_host_class_media =
- _ux_utility_memory_allocate(UX_NO_ALIGN, UX_REGULAR_MEMORY, UX_HOST_CLASS_STORAGE_MAX_MEDIA*sizeof(UX_HOST_CLASS_STORAGE_MEDIA));
-
- /* Check the completion status. */
- if (command -> ux_host_class_command_class_ptr -> ux_host_class_media == UX_NULL)
- return(UX_MEMORY_INSUFFICIENT);
- }
-
- /* Allocate a Thread stack and create the thread. */
- if (command -> ux_host_class_command_class_ptr -> ux_host_class_thread_stack == UX_NULL)
+ /* Allocate UX_HOST_CLASS_STORAGE_EXT. */
+ if (class_inst -> ux_host_class_ext == UX_NULL)
{
- /* Allocate a Thread stack. */
- command -> ux_host_class_command_class_ptr -> ux_host_class_thread_stack =
- _ux_utility_memory_allocate(UX_NO_ALIGN, UX_REGULAR_MEMORY, UX_HOST_CLASS_STORAGE_THREAD_STACK_SIZE);
+ /* Need memory for extension fields. */
+ class_ext = _ux_utility_memory_allocate(UX_NO_ALIGN,
+ UX_REGULAR_MEMORY,
+ sizeof(UX_HOST_CLASS_STORAGE_EXT));
- /* Check the completion status. */
- if (command -> ux_host_class_command_class_ptr -> ux_host_class_thread_stack == UX_NULL)
+ /* Check completion status. */
+ if (class_ext == UX_NULL)
return(UX_MEMORY_INSUFFICIENT);
-
+
/* Create the storage class thread. */
- status = _ux_utility_thread_create(&command -> ux_host_class_command_class_ptr -> ux_host_class_thread,
- "ux_host_storage_thread", _ux_host_class_storage_thread_entry,
- (ULONG) (ALIGN_TYPE) command -> ux_host_class_command_class_ptr,
- command -> ux_host_class_command_class_ptr -> ux_host_class_thread_stack,
+ status = _ux_utility_thread_create(&class_ext -> ux_host_class_thread,
+ "ux_host_storage_thread",
+ _ux_host_class_storage_thread_entry,
+ (ULONG) (ALIGN_TYPE) class_inst,
+ class_ext -> ux_host_class_thread_stack,
UX_HOST_CLASS_STORAGE_THREAD_STACK_SIZE,
UX_HOST_CLASS_STORAGE_THREAD_PRIORITY_CLASS,
UX_HOST_CLASS_STORAGE_THREAD_PRIORITY_CLASS,
- TX_NO_TIME_SLICE, TX_DONT_START);
-
+ UX_NO_TIME_SLICE, UX_DONT_START);
+
/* Check the completion status. */
if (status != UX_SUCCESS)
{
- _ux_utility_memory_free(command -> ux_host_class_command_class_ptr -> ux_host_class_thread_stack);
- command -> ux_host_class_command_class_ptr -> ux_host_class_thread_stack = UX_NULL;
+ _ux_utility_memory_free(class_ext);
+ class_inst -> ux_host_class_ext = UX_NULL;
return(UX_THREAD_ERROR);
}
- UX_THREAD_EXTENSION_PTR_SET(&(command -> ux_host_class_command_class_ptr -> ux_host_class_thread), command -> ux_host_class_command_class_ptr)
+ /* Set thead ext ptr. */
+ UX_THREAD_EXTENSION_PTR_SET(&(class_ext -> ux_host_class_thread), class_inst);
+
+ /* Save extension. */
+ class_inst -> ux_host_class_ext = (VOID *)class_ext;
+ }
+
+ /* Allocate some memory for the media structures used by UX_MEDIA (default FileX). */
+ if (class_inst -> ux_host_class_media == UX_NULL)
+ {
+
+ /* UX_HOST_CLASS_STORAGE_MAX_MEDIA*sizeof(UX_HOST_CLASS_STORAGE_MEDIA) overflow
+ * is checked outside of function.
+ */
+ class_inst -> ux_host_class_media =
+ _ux_utility_memory_allocate(UX_NO_ALIGN, UX_REGULAR_MEMORY,
+ UX_HOST_CLASS_STORAGE_MAX_MEDIA*sizeof(UX_HOST_CLASS_STORAGE_MEDIA));
- /* Now that the extension pointer has been set, resume the thread. */
- tx_thread_resume(&command -> ux_host_class_command_class_ptr -> ux_host_class_thread);
+ /* Check the completion status. */
+ if (class_inst -> ux_host_class_media == UX_NULL)
+ return(UX_MEMORY_INSUFFICIENT);
}
+ /* Now that the extension pointer has been set, resume the thread. */
+ tx_thread_resume(&class_ext -> ux_host_class_thread);
+
/* The activate command is used when the device inserted has found a parent and
is ready to complete the enumeration. */
status = _ux_host_class_storage_activate(command);
@@ -170,6 +193,40 @@ UINT status;
/* Return the completion status. */
return(status);
+ case UX_HOST_CLASS_COMMAND_DESTROY:
+
+ /* The destroy command is used when the class is unregistered. */
+
+ /* Get class. */
+ class_inst = command -> ux_host_class_command_class_ptr;
+
+ /* Free allocated media structures. */
+ if (class_inst -> ux_host_class_media)
+ {
+ _ux_utility_memory_free(class_inst -> ux_host_class_media);
+ class_inst -> ux_host_class_media = UX_NULL;
+ }
+
+ /* Free class extension resources. */
+ if (class_inst -> ux_host_class_ext)
+ {
+
+ /* Get storage class extension. */
+ class_ext = (UX_HOST_CLASS_STORAGE_EXT *)class_inst -> ux_host_class_ext;
+
+ /* Delete storage thread. */
+ _ux_utility_thread_delete(&class_ext -> ux_host_class_thread);
+
+ /* Free class extension memory. */
+ _ux_utility_memory_free(class_ext);
+
+ /* Set extension pointer to NULL. */
+ class_inst -> ux_host_class_ext = UX_NULL;
+ }
+
+ /* Return success. */
+ return(UX_SUCCESS);
+
default:
/* Error trap. */
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_max_lun_get.c b/common/usbx_host_classes/src/ux_host_class_storage_max_lun_get.c
index 0a6542d..5522d06 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_max_lun_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_max_lun_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_max_lun_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_max_lun_get(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_capacity_get.c b/common/usbx_host_classes/src/ux_host_class_storage_media_capacity_get.c
index d58848c..e575d99 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_capacity_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_capacity_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_capacity_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_capacity_get(UX_HOST_CLASS_STORAGE *storage)
@@ -160,6 +164,11 @@ ULONG command_retry;
if (storage -> ux_host_class_storage_sense_code == UX_SUCCESS)
{
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ /* Save the number of sectors. */
+ storage -> ux_host_class_storage_last_sector_number = _ux_utility_long_get_big_endian(capacity_response + UX_HOST_CLASS_STORAGE_READ_CAPACITY_DATA_LBA);
+#endif
+
/* The data is valid, save the sector size. */
storage -> ux_host_class_storage_sector_size = _ux_utility_long_get_big_endian(capacity_response + UX_HOST_CLASS_STORAGE_READ_CAPACITY_DATA_SECTOR_SIZE);
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_characteristics_get.c b/common/usbx_host_classes/src/ux_host_class_storage_media_characteristics_get.c
index 3d5975a..36c8794 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_characteristics_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_characteristics_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_characteristics_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_characteristics_get(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_format_capacity_get.c b/common/usbx_host_classes/src/ux_host_class_storage_media_format_capacity_get.c
index 959cc45..4f1e005 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_format_capacity_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_format_capacity_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_format_capacity_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_format_capacity_get(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_get.c b/common/usbx_host_classes/src/ux_host_class_storage_media_get.c
new file mode 100644
index 0000000..86b3281
--- /dev/null
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_get.c
@@ -0,0 +1,120 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** USBX Component */
+/** */
+/** Storage Class */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+/* Include necessary system files. */
+
+#define UX_SOURCE_CODE
+
+#include "ux_api.h"
+#include "ux_host_class_storage.h"
+#include "ux_host_stack.h"
+
+
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _ux_host_class_storage_media_get PORTABLE C */
+/* 6.1 */
+/* AUTHOR */
+/* */
+/* Chaoqiong Xiao, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves storage media from the storage device. */
+/* */
+/* INPUT */
+/* */
+/* storage Pointer to storage class */
+/* media_index Finding media index */
+/* storage_media Holds returned storage media */
+/* pointer */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* */
+/* CALLED BY */
+/* */
+/* Storage Class */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 09-30-2020 Chaoqiong Xiao Initial Version 6.1 */
+/* */
+/**************************************************************************/
+UINT _ux_host_class_storage_media_get(UX_HOST_CLASS_STORAGE *storage,
+ ULONG media_index,
+ UX_HOST_CLASS_STORAGE_MEDIA **storage_media)
+{
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ UX_PARAMETER_NOT_USED(storage);
+ UX_PARAMETER_NOT_USED(media_index);
+ UX_PARAMETER_NOT_USED(storage_media);
+ return(UX_FUNCTION_NOT_SUPPORTED);
+#else
+
+UX_HOST_CLASS_STORAGE_MEDIA *storage_medias;
+UX_HOST_CLASS *class_inst;
+UINT scan_index, found_index;
+
+
+ /* Get storage class instance. */
+ class_inst = storage -> ux_host_class_storage_class;
+
+ /* Get shared storage medias array. */
+ storage_medias = (UX_HOST_CLASS_STORAGE_MEDIA *)class_inst -> ux_host_class_media;
+
+ /* Search medias to find the right one. */
+ for(scan_index = 0, found_index = 0;
+ scan_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA;
+ scan_index ++)
+ {
+
+ /* Skip storage media not belong to the storage. */
+ if (storage_medias[scan_index].ux_host_class_storage_media_storage != storage)
+ continue;
+
+ /* Check expected index. */
+ if (found_index == media_index)
+ {
+ *storage_media = &storage_medias[scan_index];
+ return(UX_SUCCESS);
+ }
+
+ /* Find next related media. */
+ found_index ++;
+ }
+
+ /* Media not found. */
+ return(UX_ERROR);
+#endif
+}
+#endif
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_lock.c b/common/usbx_host_classes/src/ux_host_class_storage_media_lock.c
new file mode 100644
index 0000000..afba0ff
--- /dev/null
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_lock.c
@@ -0,0 +1,101 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** USBX Component */
+/** */
+/** Storage Class */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+/* Include necessary system files. */
+
+#define UX_SOURCE_CODE
+
+#include "ux_api.h"
+#include "ux_host_class_storage.h"
+#include "ux_host_stack.h"
+
+
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _ux_host_class_storage_media_lock PORTABLE C */
+/* 6.1 */
+/* AUTHOR */
+/* */
+/* Chaoqiong Xiao, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function lock storage and select storage media for read/write. */
+/* */
+/* INPUT */
+/* */
+/* storage_media Pointer to storage media to */
+/* select */
+/* wait Wait option */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* */
+/* CALLED BY */
+/* */
+/* Storage Class */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 09-30-2020 Chaoqiong Xiao Initial Version 6.1 */
+/* */
+/**************************************************************************/
+UINT _ux_host_class_storage_media_lock(UX_HOST_CLASS_STORAGE_MEDIA *storage_media, ULONG wait)
+{
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ UX_PARAMETER_NOT_USED(storage_media);
+ UX_PARAMETER_NOT_USED(wait);
+ return(UX_FUNCTION_NOT_SUPPORTED);
+#else
+
+UX_HOST_CLASS_STORAGE *storage;
+UINT status;
+
+
+ /* Get storage instance. */
+ storage = storage_media -> ux_host_class_storage_media_storage;
+
+ /* Protect thread reentry to this instance. */
+ status = _ux_utility_semaphore_get(&storage -> ux_host_class_storage_semaphore, wait);
+ if (status != UX_SUCCESS)
+ return(status);
+
+ /* Select the media if success. */
+ storage -> ux_host_class_storage_lun = storage_media -> ux_host_class_storage_media_lun;
+ storage -> ux_host_class_storage_sector_size = storage_media -> ux_host_class_storage_media_sector_size;
+ storage -> ux_host_class_storage_last_sector_number = storage_media -> ux_host_class_storage_media_number_sectors - 1;
+
+ /* Return success. */
+ return(UX_SUCCESS);
+#endif
+}
+#endif
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_mount.c b/common/usbx_host_classes/src/ux_host_class_storage_media_mount.c
index 3b56772..3719eae 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_mount.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_mount.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_mount PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -45,13 +45,13 @@
/* This function tries to read the first sector on the media. It then */
/* determines if this is a partition sector or a boot sector. If the */
/* sector contains partition information, each partition is checked */
-/* for a DOS aware partition and mounted by FileX. */
+/* for a DOS aware partition and mounted by UX_MEDIA (default FileX). */
/* */
/* If there is no partition sector or boot sector, we simply inform */
-/* FileX that a device is present and that its boot sector should be */
-/* periodically read to see if the device is mounted. This mechanism */
-/* applies to storage where the media can be removed (floppy, ZIP, */
-/* flash/smart media readers). */
+/* UX_MEDIA (default FileX) that a device is present and that its boot */
+/* sector should be periodically read to see if the device is mounted.*/
+/* This mechanism applies to storage where the media can be removed */
+/* (floppy, ZIP, flash/smart media readers). */
/* */
/* INPUT */
/* */
@@ -84,11 +84,20 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_mount(UX_HOST_CLASS_STORAGE *storage, ULONG sector)
{
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ UX_PARAMETER_NOT_USED(storage);
+ UX_PARAMETER_NOT_USED(sector);
+ return(UX_FUNCTION_NOT_SUPPORTED);
+#else
UCHAR *sector_memory;
UINT status;
@@ -186,5 +195,5 @@ UINT status;
/* Return completion status. */
return(status);
+#endif /* !defined(UX_HOST_CLASS_STORAGE_NO_FILEX) */
}
-
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_open.c b/common/usbx_host_classes/src/ux_host_class_storage_media_open.c
index 9f9f963..3da9480 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_open.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_open.c
@@ -35,15 +35,16 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_open PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
-/* This function will ask FileX to mount a new partition for this */
-/* device. This function has some FileX dependencies. */
+/* This function will ask UX_MEDIA (default FileX) to mount a new */
+/* partition for this device. This function has some */
+/* UX_MEDIA (default FileX) dependencies. */
/* */
/* INPUT */
/* */
@@ -56,7 +57,7 @@
/* */
/* CALLS */
/* */
-/* fx_media_open Media open */
+/* ux_media_open Media open */
/* _ux_host_class_storage_media_protection_check */
/* Check for protection */
/* _ux_utility_memory_allocate Allocate memory block */
@@ -71,37 +72,51 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, used UX_ */
+/* things instead of FX_ */
+/* things directly, used host */
+/* class extension pointer for */
+/* class specific structured */
+/* data, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_open(UX_HOST_CLASS_STORAGE *storage, ULONG hidden_sectors)
{
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ UX_PARAMETER_NOT_USED(storage);
+ UX_PARAMETER_NOT_USED(hidden_sectors);
+ return(UX_FUNCTION_NOT_SUPPORTED);
+#else
UINT status;
UINT media_index;
UX_HOST_CLASS_STORAGE_MEDIA *storage_media;
-FX_MEDIA *media;
-UX_HOST_CLASS *class;
+UX_MEDIA *media;
+UX_HOST_CLASS *class_inst;
/* We need the class container. */
- class = storage -> ux_host_class_storage_class;
+ class_inst = storage -> ux_host_class_storage_class;
/* Point the media structure to the first media in the container. */
- storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class -> ux_host_class_media;
+ storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class_inst -> ux_host_class_media;
/* Locate a free partition in the storage instance. */
for (media_index = 0; media_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA; media_index++)
{
- /* Get the FileX media pointer for that media. */
+ /* Get the USBX Integrated Media pointer for that media. */
media = &storage_media -> ux_host_class_storage_media;
/* Is the media valid? */
- if (media -> fx_media_id == 0)
+ if (ux_media_id_get(media) == 0)
{
/* Save the storage instance in the media instance. */
- media -> fx_media_driver_info = (VOID *) storage;
+ ux_media_driver_info_set(media, storage);
/* Save the number of hidden sectors in this partition. */
storage_media -> ux_host_class_storage_media_partition_start = hidden_sectors;
@@ -112,10 +127,10 @@ UX_HOST_CLASS *class;
/* Save the Sector size in the storage media instance. */
storage_media -> ux_host_class_storage_media_sector_size = storage -> ux_host_class_storage_sector_size;
- /* Save the storage media instance in the user reserved area in the FX_MEDIA structure. */
- media -> fx_media_reserved_for_user = (ALIGN_TYPE) storage_media;
+ /* Save the storage media instance in the user reserved area in the UX_MEDIA structure. */
+ ux_media_reserved_for_user_set(media, storage_media);
- /* We now need to allocate a block of memory for FileX to use when doing transfers
+ /* We now need to allocate a block of memory for UX_MEDIA (default FileX) to use when doing transfers
The default buffer size is 8K. The value used for the definition is UX_HOST_CLASS_STORAGE_MEMORY_BUFFER_SIZE.
This value can be changed to save on memory space but should not be smaller than
the media sector size (which should be 512 bytes). Because USB devices are SCSI
@@ -128,8 +143,8 @@ UX_HOST_CLASS *class;
/* If trace is enabled, insert this event into the trace buffer. */
UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_STORAGE_MEDIA_OPEN, storage, media, 0, 0, UX_TRACE_HOST_CLASS_EVENTS, 0, 0)
- /* Ask FileX to mount the partition. */
- status = fx_media_open(media, UX_HOST_CLASS_STORAGE_MEDIA_NAME, _ux_host_class_storage_driver_entry,
+ /* Ask UX_MEDIA (default FileX) to mount the partition. */
+ status = ux_media_open(media, UX_HOST_CLASS_STORAGE_MEDIA_NAME, _ux_host_class_storage_driver_entry,
storage, storage_media -> ux_host_class_storage_media_memory,
UX_HOST_CLASS_STORAGE_MEMORY_BUFFER_SIZE);
@@ -158,5 +173,5 @@ UX_HOST_CLASS *class;
/* Return error. */
return(UX_HOST_CLASS_MEMORY_ERROR);
+#endif /* !defined(UX_HOST_CLASS_STORAGE_NO_FILEX) */
}
-
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_protection_check.c b/common/usbx_host_classes/src/ux_host_class_storage_media_protection_check.c
index f24d91a..a46b97e 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_protection_check.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_protection_check.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_protection_check PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_protection_check(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_read.c b/common/usbx_host_classes/src/ux_host_class_storage_media_read.c
index a96afc5..dbc8330 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_read(UX_HOST_CLASS_STORAGE *storage, ULONG sector_start,
@@ -137,7 +139,7 @@ UINT media_retry;
/* We got an error during read. Packet not complete. */
_ux_system_error_handler(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_CLASS, UX_TRANSFER_DATA_LESS_THAN_EXPECTED);
- /* Return to FileX. */
+ /* Return to UX_MEDIA (default FileX). */
return(UX_ERROR);
}
@@ -149,7 +151,7 @@ UINT media_retry;
}
/* Check if the media in the device has been removed. If so
- we have to tell FileX that the media is closed. */
+ we have to tell UX_MEDIA (default FileX) that the media is closed. */
return(UX_HOST_CLASS_STORAGE_SENSE_ERROR);
}
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_recovery_sense_get.c b/common/usbx_host_classes/src/ux_host_class_storage_media_recovery_sense_get.c
index a865008..1885cad 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_recovery_sense_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_recovery_sense_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_recovery_sense_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_recovery_sense_get(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_media_write.c b/common/usbx_host_classes/src/ux_host_class_storage_media_write.c
index d67fac9..38e74ee 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_media_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_media_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_media_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_media_write(UX_HOST_CLASS_STORAGE *storage, ULONG sector_start,
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_partition_read.c b/common/usbx_host_classes/src/ux_host_class_storage_partition_read.c
index 7a79694..2931f50 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_partition_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_partition_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_partition_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,11 +71,20 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_partition_read(UX_HOST_CLASS_STORAGE *storage, UCHAR *sector_memory, ULONG sector)
{
-
+#if defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ UX_PARAMETER_NOT_USED(storage);
+ UX_PARAMETER_NOT_USED(sector_memory);
+ UX_PARAMETER_NOT_USED(sector);
+ return(UX_FUNCTION_NOT_SUPPORTED);
+#else
UINT status = UX_ERROR;
UINT partition_index;
@@ -123,5 +132,6 @@ UINT partition_index;
/* Return completion status. */
return(status);
+#endif
}
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_request_sense.c b/common/usbx_host_classes/src/ux_host_class_storage_request_sense.c
index bf0701c..d2e220a 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_request_sense.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_request_sense.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_request_sense PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_request_sense(UX_HOST_CLASS_STORAGE *storage)
@@ -107,7 +111,7 @@ UINT command_length;
/* Save the current command so that we can re-initiate it after the
REQUEST_SENSE command. */
- _ux_utility_memory_copy(storage -> ux_host_class_storage_saved_cbw, storage -> ux_host_class_storage_cbw, UX_HOST_CLASS_STORAGE_CBW_LENGTH);
+ _ux_utility_memory_copy(storage -> ux_host_class_storage_saved_cbw, storage -> ux_host_class_storage_cbw, UX_HOST_CLASS_STORAGE_CBW_LENGTH); /* Use case of memcpy is verified. */
/* Initialize the CBW for this command. */
_ux_host_class_storage_cbw_initialize(storage, UX_HOST_CLASS_STORAGE_DATA_IN, UX_HOST_CLASS_STORAGE_REQUEST_SENSE_RESPONSE_LENGTH, command_length);
@@ -144,7 +148,7 @@ UINT command_length;
_ux_utility_memory_free(request_sense_response);
/* Restore the current CBW command. */
- _ux_utility_memory_copy(storage -> ux_host_class_storage_cbw, storage -> ux_host_class_storage_saved_cbw, UX_HOST_CLASS_STORAGE_CBW_LENGTH);
+ _ux_utility_memory_copy(storage -> ux_host_class_storage_cbw, storage -> ux_host_class_storage_saved_cbw, UX_HOST_CLASS_STORAGE_CBW_LENGTH); /* Use case of memcpy is verified. */
/* Return completion code. */
return(status);
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_sense_code_translate.c b/common/usbx_host_classes/src/ux_host_class_storage_sense_code_translate.c
index 9d630ce..2f4ea1c 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_sense_code_translate.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_sense_code_translate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_sense_code_translate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_sense_code_translate(UX_HOST_CLASS_STORAGE *storage, UINT status)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_start_stop.c b/common/usbx_host_classes/src/ux_host_class_storage_start_stop.c
index 53bf7e9..b86ba6a 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_start_stop.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_start_stop.c
@@ -34,8 +34,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_host_class_storage_start_stop.c PORTABLE C */
-/* 6.0 */
+/* _ux_host_class_storage_start_stop PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_start_stop(UX_HOST_CLASS_STORAGE *storage,
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_thread_entry.c b/common/usbx_host_classes/src/ux_host_class_storage_thread_entry.c
index 8d6b056..da46678 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_thread_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_thread_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_thread_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -45,8 +45,8 @@
/* This function is awaken every 2 seconds to check if there was a */
/* device insertion on a specific media. This is the only way we can */
/* remount a media after the storage instance has opened the media to */
-/* FileX and the media is either not present or was removed and is */
-/* being re-)inserted. */
+/* UX_MEDIA (default FileX) and the media is either not present */
+/* or was removed and is being re-inserted. */
/* */
/* INPUT */
/* */
@@ -58,7 +58,7 @@
/* */
/* CALLS */
/* */
-/* fx_media_close Close FileX media */
+/* ux_media_close Close media */
/* _ux_host_class_storage_device_reset Reset device */
/* _ux_host_class_storage_media_mount Mount the media */
/* _ux_host_class_storage_unit_ready_test */
@@ -81,23 +81,34 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* added option to disable FX */
+/* media integration, used UX_ */
+/* things instead of FX_ */
+/* things directly, used host */
+/* class extension pointer for */
+/* class specific structured */
+/* data, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_storage_thread_entry(ULONG class_address)
{
-UX_HOST_CLASS *class;
+UX_HOST_CLASS *class_inst;
UX_HOST_CLASS_STORAGE *storage;
UINT status;
ULONG lun_index;
UX_HOST_CLASS_STORAGE_MEDIA *storage_media;
-FX_MEDIA *media;
-UCHAR *memory;
UINT media_index;
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+UX_MEDIA *media;
+UCHAR *memory;
+#endif
/* Setup pointer to class. */
- UX_THREAD_EXTENSION_PTR_GET(class, UX_HOST_CLASS, class_address)
+ UX_THREAD_EXTENSION_PTR_GET(class_inst, UX_HOST_CLASS, class_address)
/* This thread goes on forever once started. */
while(1)
@@ -108,7 +119,7 @@ UINT media_index;
/* We need to parse all the storage instances and check for a removable
media flag. */
- storage = (UX_HOST_CLASS_STORAGE *) class -> ux_host_class_first_instance;
+ storage = (UX_HOST_CLASS_STORAGE *) class_inst -> ux_host_class_first_instance;
while (storage != UX_NULL)
{
@@ -162,46 +173,72 @@ UINT media_index;
To do so, we need to parse the existing media instance and find out
if this partition was already mounted. */
- storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class -> ux_host_class_media;
+ storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class_inst -> ux_host_class_media;
/* Scan all instances of media. */
- for (media_index = 0; media_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA; media_index++)
+ for (media_index = 0; media_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA;
+ storage_media++, media_index++)
{
-
- /* Get the FileX Media attached to this media. */
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ /* Get the UX_MEDIA (default FileX) Media attached to this media. */
media = &storage_media -> ux_host_class_storage_media;
/* Check for the storage instance and lun number. */
- if ((media -> fx_media_id != 0) && (media -> fx_media_driver_info == (VOID *) storage) &&
+ if ((ux_media_id_get(media) != 0) && (ux_media_driver_info_get(media) == (VOID *) storage) &&
(storage_media -> ux_host_class_storage_media_lun == storage -> ux_host_class_storage_lun))
{
/* We preserve the memory used by this media. */
memory = storage_media -> ux_host_class_storage_media_memory;
- /* Let FileX use this instance. */
+ /* Let UX_MEDIA (default FileX) use this instance. */
status = _ux_utility_semaphore_put(&storage -> ux_host_class_storage_semaphore);
- /* Ask FileX to unmount the partition. */
- fx_media_close(media);
+ /* Ask UX_MEDIA (default FileX) to unmount the partition. */
+ ux_media_close(media);
/* This device is now unmounted. */
storage_media -> ux_host_class_storage_media_status = UX_HOST_CLASS_STORAGE_MEDIA_UNMOUNTED;
/* Reset the media ID. */
- media -> fx_media_id = 0;
+ ux_media_id_set(media, 0);
/* Now, we protect the storage instance. */
status = _ux_utility_semaphore_get(&storage -> ux_host_class_storage_semaphore, UX_WAIT_FOREVER);
if (status != UX_SUCCESS)
break;
- /* Free the memory block used for data transfer on behalf of FileX. */
+ /* Free the memory block used for data transfer on behalf of UX_MEDIA (default FileX). */
_ux_utility_memory_free(memory);
}
+#else
+
+ /* Check storage instance and lun number. */
+ if (storage_media -> ux_host_class_storage_media_storage != storage)
+ continue;
+ if (storage_media -> ux_host_class_storage_media_lun != storage -> ux_host_class_storage_lun)
+ continue;
+
+ /* Release the instance. */
+ status = _ux_utility_semaphore_put(&storage -> ux_host_class_storage_semaphore);
+
+ /* Invoke callback for media removal. */
+ if (_ux_system_host -> ux_system_host_change_function != UX_NULL)
+ {
+
+ /* Call system change function. */
+ _ux_system_host -> ux_system_host_change_function(UX_STORAGE_MEDIA_REMOVAL,
+ storage -> ux_host_class_storage_class, (VOID *) storage_media);
+ }
+
+ /* Free the storage media. */
+ storage_media -> ux_host_class_storage_media_storage = UX_NULL;
- /* Next entry in the media array. */
- storage_media++;
+ /* Now, we protect the storage instance. */
+ status = _ux_utility_semaphore_get(&storage -> ux_host_class_storage_semaphore, UX_WAIT_FOREVER);
+ if (status != UX_SUCCESS)
+ break;
+#endif
}
break;
@@ -210,34 +247,36 @@ UINT media_index;
/* We may need to unmount this partition if it was mounted before.
To do so, we need to parse the existing media instance and find out
if this partition was already mounted. */
- storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class -> ux_host_class_media;
+ storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class_inst -> ux_host_class_media;
/* Scan all instances of media. */
- for (media_index = 0; media_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA; media_index++)
+ for (media_index = 0; media_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA;
+ storage_media++, media_index++)
{
- /* Get the FileX Media attached to this media. */
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+ /* Get the UX_MEDIA (default FileX) Media attached to this media. */
media = &storage_media -> ux_host_class_storage_media;
/* Check for the storage instance and lun number. */
- if ((media -> fx_media_id != 0) && (media -> fx_media_driver_info == (VOID *) storage) &&
+ if ((ux_media_id_get(media) != 0) && (ux_media_driver_info_get(media) == (VOID *) storage) &&
(storage_media -> ux_host_class_storage_media_lun == storage -> ux_host_class_storage_lun))
{
/* We preserve the memory used by this media. */
memory = storage_media -> ux_host_class_storage_media_memory;
- /* Let FileX use this instance. */
+ /* Let UX_MEDIA (default FileX) use this instance. */
status = _ux_utility_semaphore_put(&storage -> ux_host_class_storage_semaphore);
- /* Ask FileX to unmount the partition. */
- fx_media_close(media);
+ /* Ask UX_MEDIA (default FileX) to unmount the partition. */
+ ux_media_close(media);
/* This device is now unmounted. */
storage_media -> ux_host_class_storage_media_status = UX_HOST_CLASS_STORAGE_MEDIA_UNMOUNTED;
/* Reset the media ID. */
- media -> fx_media_id = 0;
+ ux_media_id_set(media, 0);
/* Now, we protect the storage instance. */
status = _ux_utility_semaphore_get(&storage -> ux_host_class_storage_semaphore, UX_WAIT_FOREVER);
@@ -247,9 +286,34 @@ UINT media_index;
/* Free the memory block used for data transfer on behalf of FileX. */
_ux_utility_memory_free(memory);
}
+#else
+
+ /* Check storage instance and lun number. */
+ if (storage_media -> ux_host_class_storage_media_storage != storage)
+ continue;
+ if (storage_media -> ux_host_class_storage_media_lun != storage -> ux_host_class_storage_lun)
+ continue;
+
+ /* Release the instance. */
+ status = _ux_utility_semaphore_put(&storage -> ux_host_class_storage_semaphore);
+
+ /* Invoke callback for media removal. */
+ if (_ux_system_host -> ux_system_host_change_function != UX_NULL)
+ {
+
+ /* Call system change function. */
+ _ux_system_host -> ux_system_host_change_function(UX_STORAGE_MEDIA_REMOVAL,
+ storage -> ux_host_class_storage_class, (VOID *) storage_media);
+ }
- /* Next entry in the media array. */
- storage_media++;
+ /* Free the storage media. */
+ storage_media -> ux_host_class_storage_media_storage = UX_NULL;
+
+ /* Now, we protect the storage instance. */
+ status = _ux_utility_semaphore_get(&storage -> ux_host_class_storage_semaphore, UX_WAIT_FOREVER);
+ if (status != UX_SUCCESS)
+ break;
+#endif
}
/* Now, we need to retest the media to see if it is there. */
@@ -278,11 +342,43 @@ UINT media_index;
if (status != UX_SUCCESS)
break;
- /* Let FileX use this instance. */
+ /* Let UX_MEDIA (default FileX) use this instance. */
_ux_utility_semaphore_put(&storage -> ux_host_class_storage_semaphore);
+#if !defined(UX_HOST_CLASS_STORAGE_NO_FILEX)
+
/* The device seems to have been inserted, try to mount it. */
_ux_host_class_storage_media_mount(storage, 0);
+#else
+
+ /* Find a free media slot for inserted media. */
+ storage_media = (UX_HOST_CLASS_STORAGE_MEDIA *) class_inst -> ux_host_class_media;
+ for (media_index = 0; media_index < UX_HOST_CLASS_STORAGE_MAX_MEDIA;
+ storage_media ++, media_index ++)
+ {
+
+ /* Skip used storage media slots. */
+ if (storage_media -> ux_host_class_storage_media_storage != UX_NULL)
+ continue;
+
+ /* Use this free storage media slot. */
+ storage_media -> ux_host_class_storage_media_storage = storage;
+
+ /* Save media information. */
+ storage_media -> ux_host_class_storage_media_lun = (UCHAR)storage -> ux_host_class_storage_lun;
+ storage_media -> ux_host_class_storage_media_sector_size = (USHORT)storage -> ux_host_class_storage_sector_size;
+ storage_media -> ux_host_class_storage_media_number_sectors = storage -> ux_host_class_storage_last_sector_number + 1;
+
+ /* Invoke callback for media insertion. */
+ if (_ux_system_host -> ux_system_host_change_function != UX_NULL)
+ {
+
+ /* Call system change function. */
+ _ux_system_host -> ux_system_host_change_function(UX_STORAGE_MEDIA_INSERTION,
+ storage -> ux_host_class_storage_class, (VOID *) storage_media);
+ }
+ }
+#endif
/* Now, we protect the storage instance. */
_ux_utility_semaphore_get(&storage -> ux_host_class_storage_semaphore, UX_WAIT_FOREVER);
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_transport.c b/common/usbx_host_classes/src/ux_host_class_storage_transport.c
index 27f9d62..8458dbb 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_transport.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_transport.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_transport PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_transport(UX_HOST_CLASS_STORAGE *storage, UCHAR *data_pointer)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_transport_bo.c b/common/usbx_host_classes/src/ux_host_class_storage_transport_bo.c
index 26a6645..222e535 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_transport_bo.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_transport_bo.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_transport_bo PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_transport_bo(UX_HOST_CLASS_STORAGE *storage, UCHAR *data_pointer)
@@ -113,7 +116,7 @@ UCHAR *get_status_response;
return(status);
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
@@ -197,7 +200,7 @@ UCHAR *get_status_response;
if (status == UX_SUCCESS)
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we may have a time out or if we had a problem during the preparation of the transaction
we should abort the SCSI transaction. */
@@ -269,7 +272,7 @@ UCHAR *get_status_response;
return(status);
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
/* Check semaphore status. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_transport_cb.c b/common/usbx_host_classes/src/ux_host_class_storage_transport_cb.c
index ab9af48..edb5c72 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_transport_cb.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_transport_cb.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_transport_cb PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_transport_cb(UX_HOST_CLASS_STORAGE *storage, UCHAR *data_pointer)
@@ -142,7 +145,7 @@ UX_ENDPOINT *control_endpoint;
return(status);
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
/* Get the actual transfer length and update the cumulated stored value for upper layers.
This could be a non complete packet. But we don't test here because it only matters for
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_transport_cbi.c b/common/usbx_host_classes/src/ux_host_class_storage_transport_cbi.c
index 5fba387..22837b2 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_transport_cbi.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_transport_cbi.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_transport_cbi PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_transport_cbi(UX_HOST_CLASS_STORAGE *storage, UCHAR *data_pointer)
@@ -144,7 +147,7 @@ UX_ENDPOINT *control_endpoint;
return(status);
/* Wait for the completion of the transfer request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_STORAGE_TRANSFER_TIMEOUT));
/* Get the actual transfer length and update the cumulated stored value for upper layers.
This could be a non complete packet. But we don't test here because it only matters for
@@ -187,7 +190,7 @@ UX_ENDPOINT *control_endpoint;
/* We must wait for the interrupt endpoint to return the status stage now. This can
take a fairly long time. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_STORAGE_CBI_STATUS_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_STORAGE_CBI_STATUS_TIMEOUT));
/* If the status is not successful, we may have a timeout error. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_storage_unit_ready_test.c b/common/usbx_host_classes/src/ux_host_class_storage_unit_ready_test.c
index ef97201..10b8208 100644
--- a/common/usbx_host_classes/src/ux_host_class_storage_unit_ready_test.c
+++ b/common/usbx_host_classes/src/ux_host_class_storage_unit_ready_test.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_storage_unit_ready_test PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_storage_unit_ready_test(UX_HOST_CLASS_STORAGE *storage)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_activate.c b/common/usbx_host_classes/src/ux_host_class_swar_activate.c
index c59f509..df2979b 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_activate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_activate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_configure.c b/common/usbx_host_classes/src/ux_host_class_swar_configure.c
index bc118b0..7474a23 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -69,6 +69,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_configure(UX_HOST_CLASS_SWAR *swar)
@@ -76,7 +80,9 @@ UINT _ux_host_class_swar_configure(UX_HOST_CLASS_SWAR *swar)
UINT status;
UX_CONFIGURATION *configuration;
+#if UX_MAX_DEVICES > 1
UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -98,7 +104,8 @@ UX_DEVICE *parent_device;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
}
-
+
+#if UX_MAX_DEVICES > 1
/* Check the swar power source and check the parent power source for
incompatible connections. */
if (swar -> ux_host_class_swar_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -121,7 +128,8 @@ UX_DEVICE *parent_device;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration. */
status = _ux_host_stack_device_configuration_select(configuration);
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_deactivate.c b/common/usbx_host_classes/src/ux_host_class_swar_deactivate.c
index 4f3adda..1eb731a 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_deactivate(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_swar_endpoints_get.c
index 819aeae..b40c084 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_endpoints_get(UX_HOST_CLASS_SWAR *swar)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_entry.c b/common/usbx_host_classes/src/ux_host_class_swar_entry.c
index b4a754a..b2dd9bf 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_ioctl.c b/common/usbx_host_classes/src/ux_host_class_swar_ioctl.c
index af31172..47f128a 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_ioctl.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_ioctl.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_ioctl PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_ioctl(UX_HOST_CLASS_SWAR *swar, ULONG ioctl_function,
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_read.c b/common/usbx_host_classes/src/ux_host_class_swar_read.c
index a57ed4c..2b1d7c6 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* prefixed UX to MS_TO_TICK, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_read(UX_HOST_CLASS_SWAR *swar, UCHAR *data_pointer,
@@ -134,7 +137,7 @@ ULONG transfer_request_length;
{
/* Wait for the completion of the transfer_request. */
- status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, MS_TO_TICK(UX_HOST_CLASS_SWAR_CLASS_TRANSFER_TIMEOUT));
+ status = _ux_utility_semaphore_get(&transfer_request -> ux_transfer_request_semaphore, UX_MS_TO_TICK(UX_HOST_CLASS_SWAR_CLASS_TRANSFER_TIMEOUT));
/* If the semaphore did not succeed we probably have a time out. */
if (status != UX_SUCCESS)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_reception_callback.c b/common/usbx_host_classes/src/ux_host_class_swar_reception_callback.c
index a1807fa..61e1092 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_reception_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_reception_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_reception_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_swar_reception_callback (UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_reception_start.c b/common/usbx_host_classes/src/ux_host_class_swar_reception_start.c
index 650a31a..1aed62a 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_reception_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_reception_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_reception_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_reception_start (UX_HOST_CLASS_SWAR *swar,
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_reception_stop.c b/common/usbx_host_classes/src/ux_host_class_swar_reception_stop.c
index 2eadac6..e52ea0a 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_reception_stop.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_reception_stop.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_reception_stop PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_reception_stop (UX_HOST_CLASS_SWAR *swar,
diff --git a/common/usbx_host_classes/src/ux_host_class_swar_write.c b/common/usbx_host_classes/src/ux_host_class_swar_write.c
index b7f2424..f7aa426 100644
--- a/common/usbx_host_classes/src/ux_host_class_swar_write.c
+++ b/common/usbx_host_classes/src/ux_host_class_swar_write.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_swar_write PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_swar_write(UX_HOST_CLASS_SWAR *swar, UCHAR * data_pointer,
diff --git a/common/usbx_host_classes/src/ux_host_class_video_activate.c b/common/usbx_host_classes/src/ux_host_class_video_activate.c
index 440c4ca..b46f89d 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_activate.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_activate.c
@@ -39,12 +39,127 @@ UCHAR _ux_system_class_video_frame_descriptor_structure[] = {1,1
UCHAR _ux_system_host_class_video_name[] = "ux_host_class_video";
+typedef struct UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_STRUCT
+{
+ UX_HOST_CLASS_VIDEO *video;
+ ULONG parsed_flags;
+} UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER;
+#define UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VC_HEADER 1
+#define UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VC_IT 2
+#define UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VC_PU 4
+#define UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VS_HEADER 8
+#define UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_DONE (1|2|4|8)
+
+
+static UINT _ux_host_class_video_descriptors_parser(VOID *arg,
+ UCHAR *packed_interface_descriptor,
+ UCHAR *packed_entity_descriptor)
+{
+
+UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER *parser;
+UX_HOST_CLASS_VIDEO *video;
+UX_INTERFACE *streaming_interface;
+UCHAR bInCollection;
+UCHAR *baInterfaceNr;
+
+ /* Get parse data. */
+ parser = (UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER *)arg;
+
+ /* Get video instance. */
+ video = parser -> video;
+
+ if (packed_interface_descriptor[6] == UX_HOST_CLASS_VIDEO_SUBCLASS_CONTROL)
+ {
+
+ /* Parse VC descriptors. */
+
+ /* Locate control interface. */
+ if (video -> ux_host_class_video_control_interface_number == 0xFF)
+ {
+
+ /* Parse header. */
+ if (packed_entity_descriptor[2] == UX_HOST_CLASS_VIDEO_VC_HEADER)
+ {
+
+ /* Get streaming interface. */
+ streaming_interface = video -> ux_host_class_video_streaming_interface;
+
+ /* Check if this the VC interface is expected. */
+ bInCollection = packed_entity_descriptor[11];
+ baInterfaceNr = packed_entity_descriptor + 12;
+ while(bInCollection)
+ {
+
+ /* Streaming interface belongs to this control interface. */
+ if (*baInterfaceNr == streaming_interface -> ux_interface_descriptor.bInterfaceNumber)
+ {
+ video -> ux_host_class_video_control_interface_number = packed_interface_descriptor[2];
+ parser -> parsed_flags |= UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VC_HEADER;
+ return(0);
+ }
+ }
+ }
+
+ /* Not expected interface, just try next descriptor. */
+ return(0);
+ }
+ else if (packed_interface_descriptor[2] == video -> ux_host_class_video_control_interface_number)
+ {
+
+ /* It's the expected VC interface. */
+
+ /* Parse UX_HOST_CLASS_VIDEO_VC_PROCESSING_UNIT as feature_unit_id. */
+ if (packed_entity_descriptor[2] == UX_HOST_CLASS_VIDEO_VC_PROCESSING_UNIT &&
+ video -> ux_host_class_video_feature_unit_id == 0)
+ {
+ parser -> parsed_flags |= UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VC_PU;
+
+ /* Save as feature unit ID. */
+ video -> ux_host_class_video_feature_unit_id = packed_entity_descriptor[3];
+ }
+
+ /* Parse UX_HOST_CLASS_VIDEO_VC_INPUT_TERMINAL and type (first only). */
+ if (packed_entity_descriptor[2] == UX_HOST_CLASS_VIDEO_VC_INPUT_TERMINAL &&
+ video -> ux_host_class_video_terminal_id == 0)
+ {
+ parser -> parsed_flags |= UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VC_IT;
+
+ /* Save the video terminal ID. */
+ video -> ux_host_class_video_terminal_id = packed_entity_descriptor[3];
+
+ /* Save the video terminal type. */
+ video -> ux_host_class_video_terminal_type = _ux_utility_short_get(packed_entity_descriptor + 4);
+ }
+ }
+ }
+ else
+ {
+
+ /* Parse VS descriptors. */
+ if (packed_entity_descriptor[2] == UX_HOST_CLASS_VIDEO_VS_INPUT_HEADER)
+ {
+ parser -> parsed_flags |= UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_VS_HEADER;
+
+ /* Get the number of formats. */
+ video -> ux_host_class_video_number_formats = packed_entity_descriptor[3];
+
+ /* Get the length of formats. */
+ video -> ux_host_class_video_length_formats = _ux_utility_short_get(packed_entity_descriptor + 4);
+
+ /* Save the descriptor where the formats reside. */
+ video -> ux_host_class_video_format_address = packed_entity_descriptor;
+ }
+ }
+ return(0);
+}
+
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_activate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -86,14 +201,20 @@ UCHAR _ux_system_host_class_video_name[] = "ux_
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* used entities parsing API, */
+/* created new semaphore to */
+/* protect control requests, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_activate(UX_HOST_CLASS_COMMAND *command)
{
-UX_INTERFACE *interface;
-UX_HOST_CLASS_VIDEO *video;
-UINT status;
+UX_INTERFACE *interface;
+UX_HOST_CLASS_VIDEO *video;
+UINT status;
+UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER parser;
/* The video is always activated by the interface descriptor and not the
@@ -134,17 +255,19 @@ UINT status;
if (status == UX_SUCCESS)
status = _ux_host_class_video_descriptor_get(video);
- /* Locate the video device streaming terminal. */
+ /* Use parser to locate streaming terminal, formats and video controls. */
if (status == UX_SUCCESS)
- status = _ux_host_class_video_input_terminal_get(video);
-
- /* In the input terminal streaming interface get the number of formats supported. */
- if (status == UX_SUCCESS)
- status = _ux_host_class_video_input_format_get(video);
+ {
+ parser.video = video;
+ parser.parsed_flags = 0;
+ video -> ux_host_class_video_control_interface_number = 0xFF;
+ status = _ux_host_class_video_entities_parse(video,
+ _ux_host_class_video_descriptors_parser, (VOID *)&parser);
+ if (parser.parsed_flags != UX_HOST_CLASS_VIDEO_DESCRIPTORS_PARSER_DONE)
- /* Get video controls. */
- if (status == UX_SUCCESS)
- status = _ux_host_class_video_control_list_get(video);
+ /* Some of expected descriptors not found. */
+ status = UX_HOST_CLASS_VIDEO_WRONG_TYPE;
+ }
/* Create the semaphore to protect multiple threads from accessing the same
video instance. */
@@ -155,6 +278,15 @@ UINT status;
status = UX_SEMAPHORE_ERROR;
}
+ /* Create the semaphore to protect multiple threads from issuing the control
+ request at the same time. */
+ if (status == UX_SUCCESS)
+ {
+ status = _ux_utility_semaphore_create(&video -> ux_host_class_video_semaphore_control_request, "ux_video_semaphore_control", 1);
+ if (status != UX_SUCCESS)
+ status = UX_SEMAPHORE_ERROR;
+ }
+
if (status == UX_SUCCESS)
{
@@ -182,9 +314,13 @@ UINT status;
/* There was error, free resources. */
- /* The last resource, video -> ux_host_class_video_semaphore is not created or created error,
+ /* The last resource, video -> ux_host_class_video_semaphore_control_request is not created or created error,
no need to free. */
+ /* Destroy the semaphore. */
+ if (video -> ux_host_class_video_semaphore.tx_semaphore_id != 0)
+ _ux_utility_semaphore_delete(&video -> ux_host_class_video_semaphore);
+
/* Destroy the class instance. */
_ux_host_stack_class_instance_destroy(video -> ux_host_class_video_class, (VOID *) video);
diff --git a/common/usbx_host_classes/src/ux_host_class_video_alternate_setting_locate.c b/common/usbx_host_classes/src/ux_host_class_video_alternate_setting_locate.c
index 279edaa..9deb87e 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_alternate_setting_locate.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_alternate_setting_locate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_alternate_setting_locate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_alternate_setting_locate(UX_HOST_CLASS_VIDEO *video, UINT max_payload_size, UINT *alternate_setting)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_channel_start.c b/common/usbx_host_classes/src/ux_host_class_video_channel_start.c
index d0e1f39..8595e37 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_channel_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_channel_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_channel_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,6 +76,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_channel_start(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_CHANNEL *video_parameter)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_configure.c b/common/usbx_host_classes/src/ux_host_class_video_configure.c
index e9cca7b..2eea285 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_configure.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_configure.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_configure PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* optimized based on compile */
+/* definitions, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_configure(UX_HOST_CLASS_VIDEO *video)
@@ -81,8 +85,10 @@ UINT _ux_host_class_video_configure(UX_HOST_CLASS_VIDEO *video)
UINT status;
UX_CONFIGURATION *configuration;
UX_INTERFACE *interface;
-UX_DEVICE *parent_device;
ULONG interface_number;
+#if UX_MAX_DEVICES > 1
+UX_DEVICE *parent_device;
+#endif
/* If the device has been configured already, we don't need to do it
@@ -104,7 +110,9 @@ ULONG interface_number;
return(UX_CONFIGURATION_HANDLE_UNKNOWN);
- }
+ }
+
+#if UX_MAX_DEVICES > 1
/* Check the video power source and check the parent power source for
incompatible connections. */
if (video -> ux_host_class_video_device -> ux_device_power_source == UX_DEVICE_BUS_POWERED)
@@ -127,7 +135,8 @@ ULONG interface_number;
return(UX_CONNECTION_INCOMPATIBLE);
}
}
-
+#endif
+
/* We have the valid configuration. Ask the USBX stack to set this configuration */
status = _ux_host_stack_device_configuration_select(configuration);
diff --git a/common/usbx_host_classes/src/ux_host_class_video_control_get.c b/common/usbx_host_classes/src/ux_host_class_video_control_get.c
index 26602a3..1e6d701 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_control_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_control_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_control_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_control_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_control_list_get.c b/common/usbx_host_classes/src/ux_host_class_video_control_list_get.c
index 184324e..9d1422a 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_control_list_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_control_list_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_control_list_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_control_list_get(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_control_request.c b/common/usbx_host_classes/src/ux_host_class_video_control_request.c
new file mode 100644
index 0000000..ac811bf
--- /dev/null
+++ b/common/usbx_host_classes/src/ux_host_class_video_control_request.c
@@ -0,0 +1,201 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** USBX Component */
+/** */
+/** Video Class */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+/* Include necessary system files. */
+
+#define UX_SOURCE_CODE
+
+#include "ux_api.h"
+#include "ux_host_class_video.h"
+#include "ux_host_stack.h"
+
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _ux_host_class_video_control_request PORTABLE C */
+/* 6.1 */
+/* AUTHOR */
+/* */
+/* Chaoqiong Xiao, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function issues a control request to a given video entity */
+/* (unit or terminal). */
+/* The unit or terminal IDs can be parsed once the video device is */
+/* ready, via ux_host_class_video_entities_parse. */
+/* */
+/* Note: only one VideoStreaming interface is supported for now. */
+/* */
+/* INPUT */
+/* */
+/* video Pointer to video class */
+/* request The request to issue */
+/* interface_index The interface index */
+/* 0: VideoControl interface */
+/* 1: VideoStreaming 1 */
+/* N: VideoStreaming N */
+/* entity_id The terminal or unit ID */
+/* control_selector The control selector */
+/* parameter Pointer to parameter block */
+/* parameter_size Size of parameter block */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* CALLED BY */
+/* */
+/* Application */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 09-30-2020 Chaoqiong Xiao Initial Version 6.1 */
+/* */
+/**************************************************************************/
+UINT _ux_host_class_video_control_request(UX_HOST_CLASS_VIDEO *video,
+ UINT request, UCHAR interface_index,
+ UINT entity_id, UINT control_selector,
+ UCHAR *parameter, UINT parameter_size)
+{
+
+UX_ENDPOINT *control_endpoint;
+UX_TRANSFER *transfer_request;
+UINT status;
+UCHAR *control_buffer;
+UCHAR request_direction;
+UX_INTERFACE *interface;
+UCHAR interface_number;
+
+
+ /* Ensure the instance is valid. */
+ if (_ux_host_stack_class_instance_verify(_ux_system_host_class_video_name, (VOID *) video) != UX_SUCCESS)
+ return(UX_HOST_CLASS_INSTANCE_UNKNOWN);
+
+ /* Protect thread reentry to this instance. */
+ status = _ux_utility_semaphore_get(&video -> ux_host_class_video_semaphore_control_request, UX_WAIT_FOREVER);
+ if (status != UX_SUCCESS)
+ return(status);
+
+ /* We need to get the default control endpoint transfer request pointer. */
+ control_endpoint = &video -> ux_host_class_video_device -> ux_device_control_endpoint;
+ transfer_request = &control_endpoint -> ux_endpoint_transfer_request;
+
+ /* Need to allocate memory for the control buffer. */
+ control_buffer = _ux_utility_memory_allocate(UX_SAFE_ALIGN, UX_CACHE_SAFE_MEMORY, parameter_size);
+ if (control_buffer == UX_NULL)
+ {
+
+ /* Unprotect thread reentry to this instance. */
+ _ux_utility_semaphore_put(&video -> ux_host_class_video_semaphore_control_request);
+
+ /* Return an error. */
+ return(UX_MEMORY_INSUFFICIENT);
+ }
+
+ /* Get the request direction from the control request ID. */
+ request_direction = (request & 0x80);
+
+ /* Are we setting a value? */
+ if (request_direction == 0)
+ {
+
+ /* Put parameter block in buffer. */
+ if (parameter_size)
+ _ux_utility_memory_copy(control_buffer, parameter, parameter_size); /* Use case of memcpy is verified. */
+ }
+
+ /* Protect the control endpoint semaphore here. It will be unprotected in the
+ transfer request function. */
+ status = _ux_utility_semaphore_get(&video -> ux_host_class_video_device -> ux_device_protection_semaphore, UX_WAIT_FOREVER);
+
+ /* Check for status. */
+ if (status != UX_SUCCESS)
+ {
+
+ /* Something went wrong. */
+ _ux_utility_memory_free(control_buffer);
+ _ux_utility_semaphore_put(&video -> ux_host_class_video_semaphore_control_request);
+ return(status);
+ }
+
+ /* Get the interface number. */
+ if (interface_index == 0)
+ interface_number = (UCHAR)video -> ux_host_class_video_control_interface_number;
+ else
+ {
+
+ /* Only one streaming interface is supported now. */
+ interface = video -> ux_host_class_video_streaming_interface;
+ interface_number = (UCHAR)interface -> ux_interface_descriptor.bInterfaceNumber;
+ }
+
+ /* Create a transfer request for the request. */
+ transfer_request -> ux_transfer_request_data_pointer = control_buffer;
+ transfer_request -> ux_transfer_request_requested_length = parameter_size;
+ transfer_request -> ux_transfer_request_function = request;
+ transfer_request -> ux_transfer_request_type = request_direction | UX_REQUEST_TYPE_CLASS | UX_REQUEST_TARGET_INTERFACE;
+ transfer_request -> ux_transfer_request_value = (control_selector << 8);
+ transfer_request -> ux_transfer_request_index = interface_number | (entity_id << 8);
+
+ /* Send request to HCD layer. */
+ status = _ux_host_stack_transfer_request(transfer_request);
+
+ /* Check for correct transfer. */
+ if (status != UX_SUCCESS)
+ {
+
+ /* Free the previous control buffer. */
+ _ux_utility_memory_free(control_buffer);
+
+ /* Unprotect thread reentry to this instance. */
+ _ux_utility_semaphore_put(&video -> ux_host_class_video_semaphore_control_request);
+
+ /* Return completion status. */
+ return(status);
+ }
+
+ /* Are we getting a value? */
+ if (request_direction)
+ {
+
+ /* Then store it in the caller's buffer. */
+ if (parameter_size)
+ _ux_utility_memory_copy(parameter, control_buffer, parameter_size); /* Use case of memcpy is verified. */
+ }
+
+ /* Free all used resources. */
+ _ux_utility_memory_free(control_buffer);
+
+ /* Unprotect thread reentry to this instance. */
+ _ux_utility_semaphore_put(&video -> ux_host_class_video_semaphore_control_request);
+
+ /* Return completion status. */
+ return(status);
+}
diff --git a/common/usbx_host_classes/src/ux_host_class_video_control_value_get.c b/common/usbx_host_classes/src/ux_host_class_video_control_value_get.c
index 6e74320..acb7f2b 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_control_value_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_control_value_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_control_value_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_control_value_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_control_value_set.c b/common/usbx_host_classes/src/ux_host_class_video_control_value_set.c
index e5eaa5c..7c9cda3 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_control_value_set.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_control_value_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_control_value_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_control_value_set(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_deactivate.c b/common/usbx_host_classes/src/ux_host_class_video_deactivate.c
index 928a77e..36b8ffa 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_deactivate.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_deactivate.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_deactivate PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -73,6 +73,12 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* fixed issue of aborting */
+/* transfer without endpoint */
+/* ready, deleted new semaphore*/
+/* for control requests, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_deactivate(UX_HOST_CLASS_COMMAND *command)
@@ -95,7 +101,8 @@ UINT status;
return(status);
/* We need to abort transactions on the iso out pipe. */
- _ux_host_stack_endpoint_transfer_abort(video -> ux_host_class_video_isochronous_endpoint);
+ if (video -> ux_host_class_video_isochronous_endpoint)
+ _ux_host_stack_endpoint_transfer_abort(video -> ux_host_class_video_isochronous_endpoint);
/* The enumeration thread needs to sleep a while to allow the application or the class that may be using
endpoints to exit properly. */
@@ -104,8 +111,9 @@ UINT status;
/* Destroy the instance. */
_ux_host_stack_class_instance_destroy(video -> ux_host_class_video_class, (VOID *) video);
- /* Destroy the semaphore. */
+ /* Destroy the semaphores. */
_ux_utility_semaphore_delete(&video -> ux_host_class_video_semaphore);
+ _ux_utility_semaphore_delete(&video -> ux_host_class_video_semaphore_control_request);
/* Before we free the device resources, we need to inform the application
that the device is removed. */
diff --git a/common/usbx_host_classes/src/ux_host_class_video_descriptor_get.c b/common/usbx_host_classes/src/ux_host_class_video_descriptor_get.c
index b2e68a0..2bf28a7 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_descriptor_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_descriptor_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_descriptor_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_descriptor_get(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_endpoints_get.c b/common/usbx_host_classes/src/ux_host_class_video_endpoints_get.c
index f67c2d2..292aed9 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_endpoints_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_endpoints_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_endpoints_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_endpoints_get(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_entities_parse.c b/common/usbx_host_classes/src/ux_host_class_video_entities_parse.c
new file mode 100644
index 0000000..372f9f3
--- /dev/null
+++ b/common/usbx_host_classes/src/ux_host_class_video_entities_parse.c
@@ -0,0 +1,183 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** USBX Component */
+/** */
+/** Video Class */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+/* Include necessary system files. */
+
+#define UX_SOURCE_CODE
+
+#include "ux_api.h"
+#include "ux_host_class_video.h"
+#include "ux_host_stack.h"
+
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _ux_host_class_video_entities_parse PORTABLE C */
+/* 6.1 */
+/* AUTHOR */
+/* */
+/* Chaoqiong Xiao, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function parsees all interface descriptors and their video */
+/* class specific descriptors. */
+/* */
+/* The function scans the device configuration descriptor. Once the */
+/* interface descriptors of the video instance are found, each video */
+/* class descriptors belong to the interface are passed to parse */
+/* function for caller one by one to parse. The interface descriptor */
+/* is also passed to provide more information. Another pointer to */
+/* arguments is also available as parse function parameter for caller */
+/* to pass necessary caller specific data to process in parse function.*/
+/* */
+/* The descriptor parsing can be terminated by returning non-zero */
+/* code in parse function. */
+/* */
+/* INPUT */
+/* */
+/* video Pointer to video instance */
+/* parse_function Parse function for each */
+/* video class descriptor */
+/* arg Parse function argument */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* CALLED BY */
+/* */
+/* Video Class */
+/* Application */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 09-30-2020 Chaoqiong Xiao Initial Version 6.1 */
+/* */
+/**************************************************************************/
+UINT _ux_host_class_video_entities_parse(UX_HOST_CLASS_VIDEO *video,
+ UINT(*parse_function)(VOID *arg,
+ UCHAR *packed_interface_descriptor,
+ UCHAR *packed_entity_descriptor),
+ VOID* arg)
+{
+
+UCHAR *descriptor;
+UCHAR *interface_descriptor;
+UX_INTERFACE *interface;
+ULONG total_descriptor_length;
+ULONG descriptor_length;
+ULONG descriptor_type;
+UINT status;
+
+
+ /* Device state check. */
+ if (video -> ux_host_class_video_device -> ux_device_state != UX_DEVICE_CONFIGURED)
+ return(UX_HOST_CLASS_VIDEO_DEVICE_NOT_READY);
+
+ /* Get the descriptor to the selected format. */
+ descriptor = video -> ux_host_class_video_configuration_descriptor;
+ total_descriptor_length = video -> ux_host_class_video_configuration_descriptor_length;
+
+ /* Haven't found interface yet. */
+ interface_descriptor = UX_NULL;
+
+ /* Scan the descriptor for the Video Streaming interface. */
+ while (total_descriptor_length)
+ {
+
+ /* Gather the length, type and subtype of the descriptor. */
+ descriptor_length = *descriptor;
+ descriptor_type = *(descriptor + 1);
+
+ /* Make sure this descriptor has at least the minimum length. */
+ if (descriptor_length < 3)
+ return(UX_DESCRIPTOR_CORRUPTED);
+
+ /* Process relative to descriptor type. */
+ switch (descriptor_type)
+ {
+
+ case UX_INTERFACE_DESCRIPTOR_ITEM:
+
+ /* Haven't found it. */
+ interface_descriptor = UX_NULL;
+
+ /* Ensure we have the correct interface for Video Control/Streaming. */
+ if (descriptor[5] == UX_HOST_CLASS_VIDEO_CLASS)
+ {
+
+ /* VideoControl Inteface. */
+ if (descriptor[6] == UX_HOST_CLASS_VIDEO_SUBCLASS_CONTROL)
+
+ /* Mark we have found it. */
+ interface_descriptor = descriptor;
+ else
+ {
+
+ /* VideoStreaming interface, currently only one supported. */
+ interface = video -> ux_host_class_video_streaming_interface;
+ if (descriptor[2] == interface -> ux_interface_descriptor.bInterfaceNumber)
+
+ /* Mark we have found it. */
+ interface_descriptor = descriptor;
+ }
+ }
+ break;
+
+ case UX_HOST_CLASS_VIDEO_CS_INTERFACE:
+
+ /* Have we found the video interface yet? */
+ if (interface_descriptor != UX_NULL)
+ {
+
+ /* Yes, parse the entity descriptor. */
+ status = parse_function(arg, interface_descriptor, descriptor);
+
+ /* Terminate the parsing if status is not 0. */
+ if (status)
+ return(UX_SUCCESS);
+ }
+ break;
+ }
+
+ /* Verify if the descriptor is still valid. */
+ if (descriptor_length > total_descriptor_length)
+ return(UX_DESCRIPTOR_CORRUPTED);
+
+ /* Jump to the next descriptor if we have not reached the end. */
+ descriptor += descriptor_length;
+
+ /* And adjust the length left to parse in the descriptor. */
+ total_descriptor_length -= descriptor_length;
+ }
+
+ /* We get here when all descriptors scanned. */
+ return(UX_SUCCESS);
+}
diff --git a/common/usbx_host_classes/src/ux_host_class_video_entry.c b/common/usbx_host_classes/src/ux_host_class_video_entry.c
index bc2049b..5ed8e88 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_entry.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_entry.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_entry PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_entry(UX_HOST_CLASS_COMMAND *command)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_format_data_get.c b/common/usbx_host_classes/src/ux_host_class_video_format_data_get.c
index 9c86a1c..3a8afd8 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_format_data_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_format_data_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_format_data_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_format_data_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_FORMAT_DATA *format_parameter)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_frame_data_get.c b/common/usbx_host_classes/src/ux_host_class_video_frame_data_get.c
index 7abb99c..3baf531 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_frame_data_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_frame_data_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_frame_data_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_frame_data_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_DATA *frame_parameter)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_frame_interval_get.c b/common/usbx_host_classes/src/ux_host_class_video_frame_interval_get.c
index 22a801a..12be1a7 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_frame_interval_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_frame_interval_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_frame_interval_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_frame_interval_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_INTERVAL *interval_parameter)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_frame_parameters_set.c b/common/usbx_host_classes/src/ux_host_class_video_frame_parameters_set.c
index a9a86b2..13f5b19 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_frame_parameters_set.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_frame_parameters_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_frame_parameters_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_frame_parameters_set(UX_HOST_CLASS_VIDEO *video, ULONG frame_format, ULONG width, ULONG height, ULONG frame_interval)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_input_format_get.c b/common/usbx_host_classes/src/ux_host_class_video_input_format_get.c
index e44338c..e016807 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_input_format_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_input_format_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_input_format_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_input_format_get(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_input_terminal_get.c b/common/usbx_host_classes/src/ux_host_class_video_input_terminal_get.c
index 426764a..81b513e 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_input_terminal_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_input_terminal_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_input_terminal_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_input_terminal_get(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_ioctl.c b/common/usbx_host_classes/src/ux_host_class_video_ioctl.c
index a3dbd7e..b77715d 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_ioctl.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_ioctl.c
@@ -34,8 +34,8 @@
/* */
/* FUNCTION RELEASE */
/* */
-/* _ux_host_class_cdc_acm_ioctl PORTABLE C */
-/* 6.0 */
+/* _ux_host_class_video_ioctl PORTABLE C */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -77,6 +77,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_ioctl(UX_HOST_CLASS_VIDEO *video, ULONG ioctl_function,
diff --git a/common/usbx_host_classes/src/ux_host_class_video_max_payload_get.c b/common/usbx_host_classes/src/ux_host_class_video_max_payload_get.c
index 8402d8f..9b4e608 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_max_payload_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_max_payload_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_max_payload_get PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
ULONG _ux_host_class_video_max_payload_get(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_read.c b/common/usbx_host_classes/src/ux_host_class_video_read.c
index 1e92c98..728d9e1 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_read.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_read.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_read PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_read(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST *video_transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_start.c b/common/usbx_host_classes/src/ux_host_class_video_start.c
index f3396cc..7b9fc83 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_start.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_start.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_start PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,6 +65,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_start(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_stop.c b/common/usbx_host_classes/src/ux_host_class_video_stop.c
index 6789430..156cf9e 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_stop.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_stop.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_stop PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_stop(UX_HOST_CLASS_VIDEO *video)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_transfer_buffer_add.c b/common/usbx_host_classes/src/ux_host_class_video_transfer_buffer_add.c
index d7f6daa..1908c29 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_transfer_buffer_add.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_transfer_buffer_add.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_transfer_buffer_add PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -70,6 +70,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_transfer_buffer_add(UX_HOST_CLASS_VIDEO *video, UCHAR* buffer)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_transfer_buffers_add.c b/common/usbx_host_classes/src/ux_host_class_video_transfer_buffers_add.c
index 1d36642..c27114b 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_transfer_buffers_add.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_transfer_buffers_add.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_transfer_buffers_add PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -79,6 +79,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_transfer_buffers_add(UX_HOST_CLASS_VIDEO *video, UCHAR** buffers, ULONG num_buffers)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_transfer_callback_set.c b/common/usbx_host_classes/src/ux_host_class_video_transfer_callback_set.c
index 5702cff..4d61188 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_transfer_callback_set.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_transfer_callback_set.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_transfer_callback_set PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -66,6 +66,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_video_transfer_callback_set(UX_HOST_CLASS_VIDEO *video, VOID (*callback_function)(UX_TRANSFER*))
diff --git a/common/usbx_host_classes/src/ux_host_class_video_transfer_request.c b/common/usbx_host_classes/src/ux_host_class_video_transfer_request.c
index fc2f989..8c18bec 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_transfer_request.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_transfer_request.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_transfer_request PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_host_class_video_transfer_request(UX_HOST_CLASS_VIDEO *video,
diff --git a/common/usbx_host_classes/src/ux_host_class_video_transfer_request_callback.c b/common/usbx_host_classes/src/ux_host_class_video_transfer_request_callback.c
index 620ea34..764daa9 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_transfer_request_callback.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_transfer_request_callback.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_transfer_request_callback PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_video_transfer_request_callback(UX_TRANSFER *transfer_request)
diff --git a/common/usbx_host_classes/src/ux_host_class_video_transfer_request_completed.c b/common/usbx_host_classes/src/ux_host_class_video_transfer_request_completed.c
index 088eb58..b76ec04 100644
--- a/common/usbx_host_classes/src/ux_host_class_video_transfer_request_completed.c
+++ b/common/usbx_host_classes/src/ux_host_class_video_transfer_request_completed.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_host_class_video_transfer_request_completed PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -67,6 +67,8 @@
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
VOID _ux_host_class_video_transfer_request_completed(UX_TRANSFER *transfer_request)