54 #include "storage/storage_task.h"
79 static bit ms_data_direction;
82 extern U8 g_scsi_status;
83 extern U32 g_scsi_data_remaining;
84 extern bit ms_multiple_drive;
85 extern U8 g_scsi_command[16];
94 #define Usb_set_ms_data_direction_in() (ms_data_direction = 1)
95 #define Usb_set_ms_data_direction_out() (ms_data_direction = 0)
96 #define Is_usb_ms_data_direction_in() (ms_data_direction == 1)
100 PROCESS(storage_process,
"Storage process");
115 if (usb_mode == mass_storage) {
128 if (usb_mode == mass_storage) {
159 { cbw_error =
TRUE; }
161 { cbw_error =
TRUE; }
163 { cbw_error =
TRUE; }
165 { cbw_error =
TRUE; }
180 Usb_set_ms_data_direction_in();
191 Usb_set_ms_data_direction_out();
202 if (!ms_multiple_drive)
217 if (Is_usb_ms_data_direction_in())
224 if (g_scsi_data_remaining != 0)