mirror of https://github.com/ARMmbed/mbed-os.git
Revert "Deleted the debug print and the illegal memory access."
This reverts commit 6aaae4a8af.
pull/594/head
parent
697dfddc34
commit
3f32994343
|
|
@ -52,7 +52,7 @@ Typedef definitions
|
|||
/*******************************************************************************
|
||||
Macro definitions
|
||||
*******************************************************************************/
|
||||
#define DUMMY_ACCESS (*(volatile unsigned long *)(OSTM0CNT))
|
||||
#define DUMMY_ACCESS (*(volatile unsigned long *)(0x40000000))
|
||||
|
||||
/* #define CACHE_WRITEBACK */
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@ extern "C"
|
|||
//#include "USBRegs_RZ_A1H.h"
|
||||
|
||||
|
||||
/*for debug print*/
|
||||
#define DEBUG_RZ_A1H
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
const struct PIPECFGREC {
|
||||
uint16_t endpoint;
|
||||
|
|
@ -444,6 +448,24 @@ void USBHAL::EP0write(uint8_t *buffer, uint32_t size)
|
|||
if (size == MAX_PACKET_SIZE_EP0) {
|
||||
EP0_read_status = DEVDRV_USBF_WRITING;
|
||||
}
|
||||
|
||||
#if defined(DEBUG_RZ_A1H)
|
||||
{
|
||||
static const int8_t *statmesg[] = {
|
||||
"END",
|
||||
"SHRT",
|
||||
"ING",
|
||||
"DMA",
|
||||
};
|
||||
|
||||
printf(
|
||||
"call: EP0write(%.4Xh,%d) %s (%d)\n",
|
||||
(buffer[0] << 8) | buffer[1],
|
||||
size,
|
||||
statmesg[ EP0_read_status ],
|
||||
g_usb0_function_CtrZeroLengthFlag );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -481,6 +503,11 @@ EP_STATUS USBHAL::endpointRead(uint8_t endpoint, uint32_t max_size)
|
|||
status = EP_PENDING;
|
||||
}
|
||||
|
||||
#if defined(DEBUG_RZ_A1H)
|
||||
printf( "call: endpointRead(%d,%d) pipe=%d status=%d\n",
|
||||
endpoint, max_size, pipe, pipe_status );
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -521,6 +548,13 @@ EP_STATUS USBHAL::endpointReadResult(uint8_t endpoint, uint8_t *buffer, uint32_t
|
|||
status = EP_COMPLETED;
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEBUG_RZ_A1H)
|
||||
printf(
|
||||
"call: endpointReadResult(%d,%p,%u)=%d pipe=%d status=%d\n",
|
||||
endpoint, buffer, *bytes_read, err, pipe, pipe_status );
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -579,6 +613,12 @@ EP_STATUS USBHAL::endpointWrite(uint8_t endpoint, uint8_t *data, uint32_t size)
|
|||
break;
|
||||
}
|
||||
|
||||
#if defined(DEBUG_RZ_A1H)
|
||||
printf(
|
||||
"call: endpointWrite(%d,%p,%d)=%d pipe=%d status=%d\n",
|
||||
endpoint, data, size, err, pipe, pipe_status );
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -919,6 +959,10 @@ void USBHAL::usb0_function_save_request(void)
|
|||
*bufO++ = USB200.USBINDX;
|
||||
/*data[6] data[6] <= wIndex*/
|
||||
*bufO++ = USB200.USBLENG;
|
||||
|
||||
#if defined(DEBUG_RZ_A1H)
|
||||
printf( "request: %.4xh\n", setup_buffer[0] );
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
|||
Loading…
Reference in New Issue