summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorhathach <[email protected]>2014-03-09 15:30:57 +0700
committerhathach <[email protected]>2014-03-09 15:30:57 +0700
commit73ac4b4c8069744f09a20bec1e892d1eed8fd4c3 (patch)
tree05fb1b22c529e522978ce19c174fe40e12496a77 /demos
parente506f4cae2f3d06b463c28f725692165fec60727 (diff)
rename tusbd_msc_scsi_received_isr to tusbd_msc_scsi_cb
fix the status phase true --> false ASSERT_STATUS( dcd_pipe_xfer( p_msc->edpt_in , p_csw, sizeof(msc_cmd_status_wrapper_t), false) ); board ea4357 added P9_5 pull down for device connect
Diffstat (limited to 'demos')
-rw-r--r--demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c7
-rw-r--r--demos/device/src/mscd_app.c2
-rw-r--r--demos/device/src/tusb_config.h4
3 files changed, 9 insertions, 4 deletions
diff --git a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c
index f65e46b6f..09d4e121c 100644
--- a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c
+++ b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c
@@ -75,8 +75,13 @@ void board_init(void)
//------------- USB -------------//
// USB0 Power: EA4357 channel B U20 GPIO26 active low (base board), P2_3 on LPC4357
- scu_pinmux(0x2, 3, MD_PUP | MD_EZI, FUNC7); // USB0 VBus Power
+ scu_pinmux(0x02, 3, MD_PUP | MD_EZI, FUNC7); // USB0 VBus Power
+ #if TUSB_CFG_CONTROLLER_0_MODE & TUSB_MODE_DEVICE
+ scu_pinmux(0x09, 5, GPIO_PDN, FUNC4); // P9_5 (GPIO5[18]) (GPIO28 on oem base) as USB connect, active low.
+ GPIO_SetDir(5, BIT_(18), 1);
+ #endif
+
// USB1 Power: EA4357 channel A U20 is enabled by SJ5 connected to pad 1-2, no more action required
// TODO Remove R170, R171, solder a pair of 15K to USB1 D+/D- to test with USB1 Host
diff --git a/demos/device/src/mscd_app.c b/demos/device/src/mscd_app.c
index ad689549f..fa125d769 100644
--- a/demos/device/src/mscd_app.c
+++ b/demos/device/src/mscd_app.c
@@ -97,7 +97,7 @@ static scsi_mode_parameters_t msc_dev_mode_para TUSB_CFG_ATTR_USBRAM =
//--------------------------------------------------------------------+
// tinyusb callback (ISR context)
//--------------------------------------------------------------------+
-msc_csw_status_t tusbd_msc_scsi_received_isr (uint8_t coreid, uint8_t lun, uint8_t scsi_cmd[16], void ** pp_buffer, uint16_t* p_length)
+msc_csw_status_t tusbd_msc_scsi_cb (uint8_t coreid, uint8_t lun, uint8_t scsi_cmd[16], void ** pp_buffer, uint16_t* p_length)
{
// read10 & write10 has their own callback and MUST not be handled here
switch (scsi_cmd[0])
diff --git a/demos/device/src/tusb_config.h b/demos/device/src/tusb_config.h
index bfc225351..278093572 100644
--- a/demos/device/src/tusb_config.h
+++ b/demos/device/src/tusb_config.h
@@ -82,10 +82,10 @@
#define TUSB_CFG_DEVICE_FULLSPEED 1 // TODO refractor, remove
//------------- CLASS -------------//
-#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
+#define TUSB_CFG_DEVICE_HID_KEYBOARD 0
#define TUSB_CFG_DEVICE_HID_MOUSE 0
#define TUSB_CFG_DEVICE_HID_GENERIC 0
-#define TUSB_CFG_DEVICE_MSC 0
+#define TUSB_CFG_DEVICE_MSC 1
#define TUSB_CFG_DEVICE_CDC 0
//--------------------------------------------------------------------+