From 78a44055c50f4ea10ebb14714c4b6563cd64f71b Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Thu, 15 Mar 2018 20:02:10 +0100 Subject: transport: add transport_is_hla() and move declaration of all transport_is_xxx() functions to transport.h Change-Id: Ib229115b5017507b49655bc43b517ab6fb32f7a6 Signed-off-by: Tomas Vanek Reviewed-on: http://openocd.zylin.com/4469 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/jtag/hla/hla_transport.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/jtag/hla') diff --git a/src/jtag/hla/hla_transport.c b/src/jtag/hla/hla_transport.c index 5a5671db..ddacea36 100644 --- a/src/jtag/hla/hla_transport.c +++ b/src/jtag/hla/hla_transport.c @@ -233,3 +233,11 @@ static void hl_constructor(void) transport_register(&hl_jtag_transport); transport_register(&stlink_swim_transport); } + +bool transport_is_hla(void) +{ + struct transport *t; + t = get_current_transport(); + return t == &hl_swd_transport || t == &hl_jtag_transport + || t == &stlink_swim_transport; +} -- cgit v1.2.3-18-g5258