fix pingstate for highspeed bulk out transfer

temp implementation of msc host --> can issue inquiry command
This commit is contained in:
hathach
2013-09-22 18:44:55 +07:00
parent 5708863859
commit cc91a73cdc
11 changed files with 378 additions and 245 deletions

View File

@@ -112,10 +112,16 @@ void os_none_start_scheduler(void)
msc_app_task(NULL);
cdc_serial_app_task(NULL);
rndis_app_task(NULL);
// int ch = ITM_ReceiveChar();
// if ( ch > 0 )
// {
// printf("%c", ch);
// }
}
}
#endif
volatile int32_t ITM_RxBuffer;
int main(void)
{

View File

@@ -61,6 +61,18 @@
void tusbh_msc_mounted_cb(uint8_t dev_addr)
{
printf("an msc device is mounted\n");
// SCSI VendorID[8] & ProductID[16] from Inquiry Command
uint8_t const* p_vendor = tusbh_msc_get_vendor_name(dev_addr);
uint8_t const* p_product = tusbh_msc_get_product_name(dev_addr);
printf("Vendor Id: ");
for(uint8_t i=0; i<8; i++) putchar(p_vendor[i]);
printf("\nProduct Id: ");
for(uint8_t i=0; i<16; i++) putchar(p_product[i]);
putchar('\n');
}
//--------------------------------------------------------------------+

View File

@@ -73,12 +73,12 @@
//------------- CLASS -------------//
#define TUSB_CFG_HOST_HUB 0
#define TUSB_CFG_HOST_HID_KEYBOARD 1
#define TUSB_CFG_HOST_HID_KEYBOARD 0
#define TUSB_CFG_HOST_HID_MOUSE 1
#define TUSB_CFG_HOST_HID_GENERIC 0
#define TUSB_CFG_HOST_MSC 1
#define TUSB_CFG_HOST_CDC 1
#define TUSB_CFG_HOST_CDC_RNDIS 1
#define TUSB_CFG_HOST_CDC 0
#define TUSB_CFG_HOST_CDC_RNDIS 0
//--------------------------------------------------------------------+
// DEVICE CONFIGURATION