summaryrefslogtreecommitdiff
path: root/demos/host/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-09-22 18:44:55 +0700
committerhathach <[email protected]>2013-09-22 18:44:55 +0700
commitcc91a73cdc8c6f46adfcae38e4c36d819a49ab01 (patch)
tree829f83c189fd25b2eb28374ec4392a1860f2d8ca /demos/host/src
parent57088638598ccd0ea185debb8ca0fc7cbb404587 (diff)
fix pingstate for highspeed bulk out transfer
temp implementation of msc host --> can issue inquiry command
Diffstat (limited to 'demos/host/src')
-rw-r--r--demos/host/src/main.c8
-rw-r--r--demos/host/src/msc_app.c12
-rw-r--r--demos/host/src/tusb_config.h6
3 files changed, 22 insertions, 4 deletions
diff --git a/demos/host/src/main.c b/demos/host/src/main.c
index 6ec9fd795..14cf0b826 100644
--- a/demos/host/src/main.c
+++ b/demos/host/src/main.c
@@ -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)
{
diff --git a/demos/host/src/msc_app.c b/demos/host/src/msc_app.c
index 54de0d0cf..e2e5d7e4c 100644
--- a/demos/host/src/msc_app.c
+++ b/demos/host/src/msc_app.c
@@ -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');
}
//--------------------------------------------------------------------+
diff --git a/demos/host/src/tusb_config.h b/demos/host/src/tusb_config.h
index 30891fcbb..99edfcf7b 100644
--- a/demos/host/src/tusb_config.h
+++ b/demos/host/src/tusb_config.h
@@ -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