src/stlink-usb.c
/**
 * TODO - not convinced this does anything...
 * @param sl
 */
not convinced this does anything
@param sl
not convinced this does anything @param sl
void _stlink_usb_reset(stlink_t * sl) {
    struct stlink_libusb * const slu = sl->backend_data;
    unsigned char* const data = sl->q_buf;
    unsigned char* const cmd = sl->c_buf;
    ssize_t size;
    int rep_len = 2;
    int i = fill_command(sl, SG_DXFER_FROM_DEV, rep_len);
    cmd[i++] = STLINK_DEBUG_COMMAND;
    cmd[i++] = STLINK_DEBUG_RESETSYS;
    size = send_recv(slu, 1, cmd, slu->cmd_len, data, rep_len);
    if (size == -1) {
        printf("[!] send_recv\n");
        return;
    }
}
void _stlink_usb_reset ( stlink_t * sl ) { struct stlink_libusb * const slu = sl -> backend_data ; unsigned char * const data = sl -> q_buf ; unsigned char * const cmd = sl -> c_buf ; ssize_t size ; int rep_len = 2 ; int i = fill_command ( sl , SG_DXFER_FROM_DEV , rep_len ) ; cmd [ i ++ ] = STLINK_DEBUG_COMMAND ; cmd [ i ++ ] = STLINK_DEBUG_RESETSYS ; size = send_recv ( slu , 1 , cmd , slu -> cmd_len , data , rep_len ) ; if ( size == -1 ) { printf ( " \n " ) ; return ; } }
TODO - not convinced this does anything...
 @param sl
TODO - not convinced this does anything ... @param sl