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 <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4469 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
This commit is contained in:
committed by
Matthias Welwarsky
parent
828ee07657
commit
78a44055c5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user