- fix rlink build under native win32 (mingw)
- remove rlink build warnings - add usb_set_configuration to rlink_init, win32 requires this - add win32 ETIMEDOUT define git-svn-id: svn://svn.berlios.de/openocd/trunk@1260 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
e2c2b2d926
commit
9d1f95e01a
|
@ -84,7 +84,6 @@ struct timeval {
|
|||
/* gettimeofday() */
|
||||
#ifndef HAVE_GETTIMEOFDAY
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
struct timezone {
|
||||
int tz_minuteswest;
|
||||
|
@ -161,6 +160,12 @@ void usleep(int us);
|
|||
#include <windows.h>
|
||||
#include <time.h>
|
||||
|
||||
/* win32 systems do not support ETIMEDOUT */
|
||||
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#endif
|
||||
|
||||
#if IS_MINGW == 1
|
||||
static __inline unsigned char inb(unsigned short int port)
|
||||
{
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <usb.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* project specific includes */
|
||||
#include "log.h"
|
||||
|
@ -1034,7 +1035,6 @@ rlink_scan(
|
|||
int tdi_bit_offset;
|
||||
u8 tdi_mask, *tdi_p;
|
||||
u8 dtc_mask;
|
||||
dtc_reply_queue_entry_t *rq_entry;
|
||||
|
||||
if(scan_size < 1) {
|
||||
LOG_ERROR("scan_size cannot be less than 1 bit\n");
|
||||
|
@ -1555,7 +1555,7 @@ int rlink_init(void)
|
|||
{
|
||||
struct usb_bus *busses;
|
||||
struct usb_bus *bus;
|
||||
int c, i, a, j, retries,len;
|
||||
int i, j, retries;
|
||||
int found=0;
|
||||
int success=0;
|
||||
u8 reply_buffer[USB_EP1IN_SIZE];
|
||||
|
@ -1597,6 +1597,9 @@ int rlink_init(void)
|
|||
{
|
||||
LOG_DEBUG("Opened device, pHDev = %p\n",pHDev);
|
||||
|
||||
/* usb_set_configuration required under win32 */
|
||||
usb_set_configuration(pHDev, dev->config[0].bConfigurationValue);
|
||||
|
||||
retries = 3;
|
||||
do
|
||||
{
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# rlink interface
|
||||
interface rlink
|
||||
|
Loading…
Reference in New Issue