X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstlink-usb.c;fp=src%2Fstlink-usb.c;h=4cdefd795486d89965b2c9869ced5677d9232606;hb=25deee1055cdea42a4b28597f36e612bec77a2a1;hp=e7e029880814c4ff553fe27c4cdbeff436986ad7;hpb=c9fe1103bd2df3ee6724d4abd5e5647b0e97cf6a;p=fw%2Fstlink diff --git a/src/stlink-usb.c b/src/stlink-usb.c index e7e0298..4cdefd7 100644 --- a/src/stlink-usb.c +++ b/src/stlink-usb.c @@ -743,6 +743,10 @@ stlink_t *stlink_open_usb(enum ugly_loglevel verbose, bool reset, char serial[16 int devBus =0; int devAddr=0; + /* @TODO: Reading a environment variable in a usb open function is not very nice, this + should be refactored and moved into the CLI tools, and instead of giving USB_BUS:USB_ADDR a real stlink + serial string should be passed to this function. Probably people are using this but this is very odd because + as programmer can change to multiple busses and it is better to detect them based on serial. */ char *device = getenv("STLINK_DEVICE"); if (device) { char *c = strchr(device,':');