- // ALLLL of this should move into "stlink_open_xxx"
-
- if (stlink_current_mode(sl) != STLINK_DEV_DEBUG_MODE) {
- if (stlink_current_mode(sl) == STLINK_DEV_DFU_MODE) {
- stlink_exit_dfu_mode(sl);
- }
- stlink_enter_swd_mode(sl);
- }
-
- uint32_t chip_id = stlink_chip_id(sl);
- uint32_t core_id = stlink_core_id(sl);