diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2018-03-15 20:02:10 +0100 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2018-03-20 11:48:44 +0000 |
commit | 78a44055c50f4ea10ebb14714c4b6563cd64f71b (patch) | |
tree | d8a9a26c25880c34fb58e5b6ed69658a6ab40059 /src/transport | |
parent | 828ee07657914212f81152a768a8ec43bb73db03 (diff) |
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>
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/transport.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h index 6c57067a..d0a77ddf 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h @@ -19,6 +19,10 @@ #ifndef OPENOCD_TRANSPORT_TRANSPORT_H #define OPENOCD_TRANSPORT_TRANSPORT_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "helper/command.h" /** @@ -90,4 +94,19 @@ int allow_transports(struct command_context *ctx, const char * const *vector); bool transports_are_declared(void); +bool transport_is_jtag(void); +bool transport_is_swd(void); + +/* FIXME: ZY1000 test build on jenkins is configured with enabled hla adapters + * but jtag/hla/hla_*.c files are not compiled. To workaround the problem we assume hla + * is broken if BUILD_ZY1000 is set */ +#if BUILD_HLADAPTER && !BUILD_ZY1000 +bool transport_is_hla(void); +#else +static inline bool transport_is_hla(void) +{ + return false; +} +#endif + #endif /* OPENOCD_TRANSPORT_TRANSPORT_H */ |