summaryrefslogtreecommitdiff
path: root/src/class/usbtmc
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2019-09-18 19:30:44 -0400
committerNathan Conrad <[email protected]>2019-09-18 19:30:44 -0400
commit99d03fcaee64104df96e332a2347aa7ecc1b6172 (patch)
tree5e81d5cfe1639912c47a95511fa1bf3960264f46 /src/class/usbtmc
parenteea71a8b3b080299ad95ac79a7d45b2dc0d5b6f6 (diff)
small fixes
Diffstat (limited to 'src/class/usbtmc')
-rw-r--r--src/class/usbtmc/usbtmc_device.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/class/usbtmc/usbtmc_device.c b/src/class/usbtmc/usbtmc_device.c
index c71d4d963..0f14fdfb4 100644
--- a/src/class/usbtmc/usbtmc_device.c
+++ b/src/class/usbtmc/usbtmc_device.c
@@ -31,8 +31,6 @@
* This file is part of the TinyUSB stack.
*/
-#include "tusb_option.h"
-
// Synchronization is needed in some spots.
// These functions should NOT be called from interrupts.
@@ -71,6 +69,9 @@
// Abort bulk in/out
// No CLEAR_FEATURE/HALT no EP (yet)
+
+#include "tusb_option.h"
+
#if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_USBTMC)
#include <string.h>
@@ -78,8 +79,12 @@
#include "usbtmc_device.h"
#include "device/dcd.h"
#include "device/usbd.h"
+
+#ifdef xDEBUG
#include "uart_util.h"
static char logMsg[150];
+#endif
+
// FIXME: I shouldn't need to include _pvt headers.
#include "device/usbd_pvt.h"
@@ -447,7 +452,7 @@ bool usbtmcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint
break;
case USBTMC_MSGID_DEV_DEP_MSG_IN:
- uart_tx_sync("Handling msg in req\r\n", 21);
+ TRACE("Handling msg in req\r\n");
TU_VERIFY(handle_devMsgIn(rhport, msg, xferred_bytes));
break;
@@ -643,7 +648,7 @@ bool usbtmcd_control_request(uint8_t rhport, tusb_control_request_t const * requ
TU_VERIFY(request->bmRequestType == 0xA2); // in,class,EP
TU_VERIFY(request->wLength == sizeof(rsp));
TU_VERIFY(request->wIndex == usbtmc_state.ep_bulk_out);
- TU_VERIFY(usbtmcd_app_check_abort_bulk_out(rhport, &(rsp.USBTMC_status)));
+ TU_VERIFY(usbtmcd_app_check_abort_bulk_out(rhport, &rsp));
TU_VERIFY(usbd_edpt_xfer(rhport, 0u, (void*)&rsp,sizeof(rsp)));
return true;
}