summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-11-03 14:08:38 +0700
committerhathach <[email protected]>2019-11-03 14:08:38 +0700
commit62f8c14fae1c7c2f7d5cd5246e18f305d638f5f6 (patch)
treef4ec7eebf58853318a25bc660f7587c0e5674419 /src
parent5ca75eb84ced12d54975146b0646244aa1ffe2a1 (diff)
add a bit of log1 for debugging
Diffstat (limited to 'src')
-rw-r--r--src/device/usbd.c4
-rw-r--r--src/osal/osal_none.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 0b9713e94..997416901 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -376,7 +376,7 @@ void tud_task (void)
case DCD_EVENT_SETUP_RECEIVED:
TU_LOG2(" ");
- TU_LOG2_MEM(&event.setup_received, 1, 8);
+ TU_LOG1_MEM(&event.setup_received, 1, 8);
// Mark as connected after receiving 1st setup packet.
// But it is easier to set it every time instead of wasting time to check then set
@@ -385,6 +385,7 @@ void tud_task (void)
// Process control request
if ( !process_control_request(event.rhport, &event.setup_received) )
{
+ TU_LOG1(" Stall EP0\r\n");
// Failed -> stall both control endpoint IN and OUT
dcd_edpt_stall(event.rhport, 0);
dcd_edpt_stall(event.rhport, 0 | TUSB_DIR_IN_MASK);
@@ -404,6 +405,7 @@ void tud_task (void)
if ( 0 == epnum )
{
+ TU_LOG1(" EP Addr = 0x%02X, len = %ld\r\n", ep_addr, event.xfer_complete.len);
usbd_control_xfer_cb(event.rhport, ep_addr, event.xfer_complete.result, event.xfer_complete.len);
}
else
diff --git a/src/osal/osal_none.h b/src/osal/osal_none.h
index fa581215d..5868dfb36 100644
--- a/src/osal/osal_none.h
+++ b/src/osal/osal_none.h
@@ -198,6 +198,8 @@ static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, b
_osal_q_unlock(qhdl);
}
+ TU_ASSERT(success);
+
return success;
}