From f84c78a2e1994ef8efcdd8768dc2a6b0ee363189 Mon Sep 17 00:00:00 2001 From: zwelch Date: Mon, 8 Jun 2009 00:42:15 +0000 Subject: Finish off the dummy minidriver integration: - Try to disambiguates minidriver options from "standard" driver options. - Make minidummy symbols more explict about being a minidriver. - Move minidummy.c into minidummy directory to put it with its header. In configure.in: - Improve configuration option to allow new minidriver implementations: - Change option from --enable-minidummy to --enable-minidriver-dummy. - Move it to the end of the list of options. - Provides a clear pattern for future minidrivers. - Update handling of HAVE_JTAG_MINIDRIVER_H: - Check for external jtag_minidriver.h only with --enable-ecosboard. - Otherwise, define it when --enable-minidriver-dummy is provided. - Add check to ensure only one minidriver is enabled. - When a minidriver is enabled, warn user that standard drivers are not built. - Use proper AC_DEFINE semantics with MINIDRIVER_DUMMY. In src/jtag/Makefile.am: - Restructure handling of minidummy source files. - Include minidummy driver header in the distribution. In src/jtag/jtag.c: - Restructure preprocessor logic to include: - only one minidriver, or - all configured standard drivers. git-svn-id: svn://svn.berlios.de/openocd/trunk@2102 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/jtag.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/jtag/jtag.c') diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index 68214455..8bc19112 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -97,11 +97,9 @@ static bool hasKHz = false; #if BUILD_ECOSBOARD == 1 extern jtag_interface_t zy1000_interface; -#endif - -#if BUILD_MINIDUMMY == 1 +#elif defined(BUILD_MINIDRIVER_DUMMY) extern jtag_interface_t minidummy_interface; -#endif +#else // standard drivers #if BUILD_PARPORT == 1 extern jtag_interface_t parport_interface; #endif @@ -157,14 +155,21 @@ static bool hasKHz = false; #if BUILD_ARMJTAGEW == 1 extern jtag_interface_t armjtagew_interface; #endif +#endif // standard drivers +/** + * The list of built-in JTAG interfaces, containing entries for those + * drivers that were enabled by the @c configure script. + * + * The list should be defined to contain either one minidriver interface + * or some number of standard driver interfaces, never both. + */ jtag_interface_t *jtag_interfaces[] = { #if BUILD_ECOSBOARD == 1 &zy1000_interface, -#endif -#if BUILD_MINIDUMMY == 1 +#elif defined(BUILD_MINIDRIVER_DUMMY) &minidummy_interface, -#endif +#else // standard drivers #if BUILD_PARPORT == 1 &parport_interface, #endif @@ -207,6 +212,7 @@ jtag_interface_t *jtag_interfaces[] = { #if BUILD_ARMJTAGEW == 1 &armjtagew_interface, #endif +#endif // standard drivers NULL, }; -- cgit v1.2.3-18-g5258