printf("device: 0x%04x, 0x%04x\n", desc.idVendor, desc.idProduct);
- if (desc.idVendor != 0x0483)
+ if (desc.idVendor != USB_ST_VID)
return 0;
- if (desc.idProduct != 0x3748)
+ if (desc.idProduct != USB_STLINK_32L_PID)
return 0;
return 1;
/* mode = (int)read_uint16(buf, 0); */
mode = (int) buf[0];
-
-#if 1 /* DEBUG */
- printf("mode == 0x%x\n", mode);
-#endif /* DEBUG */
-
-
+ DD(sl, "mode == 0x%x\n", mode);
return mode;
}
stlink_print_data(sl);
}
-void _stlink_usb_read_all_regs(stlink_t *sl) {
+void _stlink_usb_read_all_regs(stlink_t *sl, reg *regp) {
DD(sl, "oops! read_all_regs not implemented for USB!\n");
}
_stlink_usb_read_all_regs,
_stlink_usb_read_reg,
_stlink_usb_write_reg,
- _stlink_usb_step
+ _stlink_usb_step,
+ _stlink_usb_current_mode
};