kopia lustrzana https://github.com/stlink-org/stlink
Revert "Make _stlink_usb_reset use hardreset"
rodzic
2da33f84cd
commit
69feeaa600
|
@ -68,7 +68,6 @@ extern "C" {
|
||||||
#define STLINK_DEBUG_WRITEDEBUGREG 0x0f
|
#define STLINK_DEBUG_WRITEDEBUGREG 0x0f
|
||||||
#define STLINK_DEBUG_ENTER_SWD 0xa3
|
#define STLINK_DEBUG_ENTER_SWD 0xa3
|
||||||
#define STLINK_DEBUG_ENTER_JTAG 0x00
|
#define STLINK_DEBUG_ENTER_JTAG 0x00
|
||||||
#define STLINK_DEBUG_HARDRESET 0x3c
|
|
||||||
|
|
||||||
// TODO - possible poor names...
|
// TODO - possible poor names...
|
||||||
#define STLINK_SWD_ENTER 0x30
|
#define STLINK_SWD_ENTER 0x30
|
||||||
|
|
|
@ -413,8 +413,7 @@ void _stlink_usb_reset(stlink_t * sl) {
|
||||||
int i = fill_command(sl, SG_DXFER_FROM_DEV, rep_len);
|
int i = fill_command(sl, SG_DXFER_FROM_DEV, rep_len);
|
||||||
|
|
||||||
cmd[i++] = STLINK_DEBUG_COMMAND;
|
cmd[i++] = STLINK_DEBUG_COMMAND;
|
||||||
cmd[i++] = STLINK_DEBUG_HARDRESET;
|
cmd[i++] = STLINK_DEBUG_RESETSYS;
|
||||||
cmd[i++] = 0x2;
|
|
||||||
|
|
||||||
size = send_recv(slu, 1, cmd, slu->cmd_len, data, rep_len);
|
size = send_recv(slu, 1, cmd, slu->cmd_len, data, rep_len);
|
||||||
if (size == -1) {
|
if (size == -1) {
|
||||||
|
|
Ładowanie…
Reference in New Issue