Skip to content

Commit

Permalink
hosted/windows/bmp_libusb: Default to JLink probe if VID is Segger
Browse files Browse the repository at this point in the history
  • Loading branch information
sidprice authored and dragonmux committed Jul 18, 2023
1 parent a1c5ca4 commit 6eaed96
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/platforms/hosted/bmp_libusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ debugger_device_s debugger_devices[] = {
bmp_type_t get_type_from_vid_pid(const uint16_t probe_vid, const uint16_t probe_pid)
{
bmp_type_t probe_type = BMP_TYPE_NONE;
/*
* Segger probe PIDs are unknown, if we have a Segger probe force the type to JLink
*/
if (probe_vid == VENDOR_ID_SEGGER) {
return BMP_TYPE_JLINK;
}

for (size_t index = 0; debugger_devices[index].type != BMP_TYPE_NONE; index++) {
if (probe_vid == debugger_devices[index].vendor && probe_pid == debugger_devices[index].product) {
probe_type = debugger_devices[index].type;
break;
}
if (debugger_devices[index].vendor == probe_vid && debugger_devices[index].product == probe_pid)
return debugger_devices[index].type;
}
return probe_type;
}
Expand Down

0 comments on commit 6eaed96

Please sign in to comment.