jtag/drivers/jlink: Use correct command errors
[openocd.git] / src / svf / svf.h
blob74f7d9ca9b23f59d17760a8d74d6a98c47165ff1
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2009 by Simon Qian *
5 * SimonQian@SimonQian.com *
6 ***************************************************************************/
8 #ifndef OPENOCD_SVF_SVF_H
9 #define OPENOCD_SVF_SVF_H
11 #include <jtag/jtag.h>
13 int svf_register_commands(struct command_context *cmd_ctx);
15 /**
16 * svf_add_statemove() moves from the current state to @a goal_state.
18 * @param goal_state The final TAP state.
19 * @return ERROR_OK on success, or an error code on failure.
21 * The current and goal states must satisfy svf_tap_state_is_stable().
22 * State transition paths used by this routine are those given in the
23 * SVF specification for single-argument STATE commands (and also used
24 * for various other state transitions).
26 int svf_add_statemove(tap_state_t goal_state);
28 /**
29 * svf_tap_state_is_stable() returns true for stable non-SHIFT states
31 * @param state The TAP state in question
32 * @return true iff the state is stable and not a SHIFT state.
34 bool svf_tap_state_is_stable(tap_state_t state);
36 #endif /* OPENOCD_SVF_SVF_H */