stlink_cmd_allow_retry() function
Issue an STLINK command via USB transfer, with retries on any wait status responses. Works for commands where the STLINK_DEBUG status is returned in the first byte of the response packet. For SWIM a SWIM_READSTATUS is requested instead. Returns an openocd result code.
Syntax
static int stlink_cmd_allow_retry(void *handle,
const uint8_t *buf,
int size);