#include <jtag/commands.h>
#include "libusb_common.h"
#include <string.h>
-#include <sys/timeb.h>
#include <time.h>
#define OPENDOUS_MAX_VIDS_PIDS 4
int opendous_get_version_info(void);
#ifdef _DEBUG_USB_COMMS_
-char time_str[50];
static void opendous_debug_buffer(uint8_t *buffer, int length);
-char *opendous_get_time(char *);
#endif
static struct opendous_jtag *opendous_jtag_handle;
}
#ifdef _DEBUG_USB_COMMS_
- LOG_DEBUG("%s: USB write begin", opendous_get_time(time_str));
+ LOG_DEBUG("USB write begin");
#endif
if (opendous_probe->CONTROL_TRANSFER) {
result = jtag_libusb_control_transfer(opendous_jtag->usb_handle,
(char *)usb_out_buffer, out_length, OPENDOUS_USB_TIMEOUT);
}
#ifdef _DEBUG_USB_COMMS_
- LOG_DEBUG("%s: USB write end: %d bytes", opendous_get_time(time_str), result);
+ LOG_DEBUG("USB write end: %d bytes", result);
#endif
DEBUG_JTAG_IO("opendous_usb_write, out_length = %d, result = %d", out_length, result);
int opendous_usb_read(struct opendous_jtag *opendous_jtag)
{
#ifdef _DEBUG_USB_COMMS_
- LOG_DEBUG("%s: USB read begin", opendous_get_time(time_str));
+ LOG_DEBUG("USB read begin");
#endif
int result;
if (opendous_probe->CONTROL_TRANSFER) {
(char *)usb_in_buffer, OPENDOUS_IN_BUFFER_SIZE, OPENDOUS_USB_TIMEOUT);
}
#ifdef _DEBUG_USB_COMMS_
- LOG_DEBUG("%s: USB read end: %d bytes", opendous_get_time(time_str), result);
+ LOG_DEBUG("USB read end: %d bytes", result);
#endif
DEBUG_JTAG_IO("opendous_usb_read, result = %d", result);
LOG_DEBUG("%s", line);
}
}
-
-char *opendous_get_time(char *str)
-{
- struct timeb timebuffer;
- char *timeline;
-
- ftime(&timebuffer);
- timeline = ctime(&(timebuffer.time));
- snprintf(str, 49, "%.8s.%hu", &timeline[11], timebuffer.millitm);
- return str;
-}
#endif