projects
/
fw
/
stlink
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix getting error message when successfully using stlinkV2
[fw/stlink]
/
src
/
stlink-sg.h
diff --git
a/src/stlink-sg.h
b/src/stlink-sg.h
index 8485d3d88eb0d7f50c3dce9b6b059936a5ea1aee..7c020285176283602885d285bf38e7e13eef8d98 100644
(file)
--- a/
src/stlink-sg.h
+++ b/
src/stlink-sg.h
@@
-1,4
+1,4
@@
-/*
+/*
* File: stlink-sg.h
* Author: karl
*
* File: stlink-sg.h
* Author: karl
*
@@
-11,11
+11,11
@@
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
-
-#include <libusb
-1.0/libusb
.h>
+
+#include <libusb.h>
#include "stlink-common.h"
#include "stlink-common.h"
-
-
// device access
+
+ // device access
#define RDWR 0
#define RO 1
#define SG_TIMEOUT_SEC 1 // actually 1 is about 2 sec
#define RDWR 0
#define RO 1
#define SG_TIMEOUT_SEC 1 // actually 1 is about 2 sec
@@
-46,7
+46,7
@@
extern "C" {
libusb_device_handle *usb_handle;
unsigned ep_rep;
unsigned ep_req;
libusb_device_handle *usb_handle;
unsigned ep_rep;
unsigned ep_req;
-
+
int sg_fd;
int do_scsi_pt_err;
int sg_fd;
int do_scsi_pt_err;
@@
-57,12
+57,13
@@
extern "C" {
uint32_t q_addr;
// Sense (error information) data
uint32_t q_addr;
// Sense (error information) data
+ // obsolete, this was fed to the scsi tools
unsigned char sense_buf[SENSE_BUF_LEN];
reg reg;
};
unsigned char sense_buf[SENSE_BUF_LEN];
reg reg;
};
- stlink_t* stlink_v1_open(const
char *dev_name, const int verbose
);
+ stlink_t* stlink_v1_open(const
int verbose, int reset
);
#ifdef __cplusplus
}
#ifdef __cplusplus
}