static int swd_check_reconnect(struct adiv5_dap *dap) { if (dap->do_reconnect) return swd_connect(dap); return ERROR_OK; }
/** * SWD - Try to connect to the target * * This will do the following: * - Switch the interface to SWD mode * - Read IDCODE * - Clear any sticky errors * * @return * == \ref BDM_RC_OK => success \n * != \ref BDM_RC_OK => error */ uint8_t f_CMD_SWD_CONNECT(void) { uint8_t rc; ahb_ap_csw_defaultValue_B0 = 0; rc = swd_connect(); (void)swd_clearStickyError(); return rc; }