mips32, add generic scan 32 function
[fw/openocd] / src / transport / transport.h
index a7a73d10f5f15aa7acd7cc95d1f5c4b58ca53fa6..6c57067a34b371922440645342859ad057f82216 100644 (file)
  * GNU General Public License for more details.
 
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef TRANSPORT_H
-#define TRANSPORT_H
+#ifndef OPENOCD_TRANSPORT_TRANSPORT_H
+#define OPENOCD_TRANSPORT_TRANSPORT_H
 
 #include "helper/command.h"
 
@@ -65,6 +64,14 @@ struct transport {
         */
        int (*init)(struct command_context *ctx);
 
+       /**
+        * Optional. If defined, allows transport to override target
+        * name prior to initialisation.
+        *
+        * @returns ERROR_OK on success, or an error code on failure.
+        */
+       int (*override_target)(const char **targetname);
+
        /**
         * Transports are stored in a singly linked list.
         */
@@ -79,8 +86,8 @@ int transport_register_commands(struct command_context *ctx);
 
 COMMAND_HELPER(transport_list_parse, char ***vector);
 
-int allow_transports(struct command_context *ctx, const char **vector);
+int allow_transports(struct command_context *ctx, const char * const *vector);
 
 bool transports_are_declared(void);
 
-#endif
+#endif /* OPENOCD_TRANSPORT_TRANSPORT_H */