missing \r\n after TU_LOG_BUF => moved \r\n to tu_print_buf()
This commit is contained in:
@@ -60,6 +60,7 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent);
|
|||||||
|
|
||||||
static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) {
|
static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) {
|
||||||
for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]);
|
for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]);
|
||||||
|
tu_printf("\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log with Level
|
// Log with Level
|
||||||
|
@@ -500,7 +500,6 @@ void tud_task_ext(uint32_t timeout_ms, bool in_isr)
|
|||||||
|
|
||||||
case DCD_EVENT_SETUP_RECEIVED:
|
case DCD_EVENT_SETUP_RECEIVED:
|
||||||
TU_LOG_BUF(CFG_TUD_LOG_LEVEL, &event.setup_received, 8);
|
TU_LOG_BUF(CFG_TUD_LOG_LEVEL, &event.setup_received, 8);
|
||||||
TU_LOG_USBD("\r\n");
|
|
||||||
|
|
||||||
// Mark as connected after receiving 1st setup packet.
|
// 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
|
// But it is easier to set it every time instead of wasting time to check then set
|
||||||
|
@@ -589,7 +589,6 @@ bool tuh_control_xfer (tuh_xfer_t* xfer) {
|
|||||||
(xfer->setup->bmRequestType_bit.type == TUSB_REQ_TYPE_STANDARD && xfer->setup->bRequest <= TUSB_REQ_SYNCH_FRAME) ?
|
(xfer->setup->bmRequestType_bit.type == TUSB_REQ_TYPE_STANDARD && xfer->setup->bRequest <= TUSB_REQ_SYNCH_FRAME) ?
|
||||||
tu_str_std_request[xfer->setup->bRequest] : "Class Request");
|
tu_str_std_request[xfer->setup->bRequest] : "Class Request");
|
||||||
TU_LOG_BUF_USBH(xfer->setup, 8);
|
TU_LOG_BUF_USBH(xfer->setup, 8);
|
||||||
TU_LOG_USBH("\r\n");
|
|
||||||
|
|
||||||
if (xfer->complete_cb) {
|
if (xfer->complete_cb) {
|
||||||
TU_ASSERT( hcd_setup_send(rhport, daddr, (uint8_t const*) &_ctrl_xfer.request) );
|
TU_ASSERT( hcd_setup_send(rhport, daddr, (uint8_t const*) &_ctrl_xfer.request) );
|
||||||
@@ -662,7 +661,6 @@ static bool usbh_control_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result
|
|||||||
if (XFER_RESULT_SUCCESS != result) {
|
if (XFER_RESULT_SUCCESS != result) {
|
||||||
TU_LOG_USBH("[%u:%u] Control %s, xferred_bytes = %lu\r\n", rhport, dev_addr, result == XFER_RESULT_STALLED ? "STALLED" : "FAILED", xferred_bytes);
|
TU_LOG_USBH("[%u:%u] Control %s, xferred_bytes = %lu\r\n", rhport, dev_addr, result == XFER_RESULT_STALLED ? "STALLED" : "FAILED", xferred_bytes);
|
||||||
TU_LOG_BUF_USBH(request, 8);
|
TU_LOG_BUF_USBH(request, 8);
|
||||||
TU_LOG_USBH("\r\n");
|
|
||||||
|
|
||||||
// terminate transfer if any stage failed
|
// terminate transfer if any stage failed
|
||||||
_xfer_complete(dev_addr, result);
|
_xfer_complete(dev_addr, result);
|
||||||
|
Reference in New Issue
Block a user