diff options
| author | Keith Packard <keithp@keithp.com> | 2009-04-06 11:31:49 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2009-04-06 11:32:21 -0700 | 
| commit | 2d9b8a83a2d9f495199033e43f519d26f27938fe (patch) | |
| tree | 495a2cbf1573ac0b42d6331e9627e28448c65ef7 /lib/ccdbg-debug.c | |
| parent | 24edd56155ed0fa02fdd8f66fdc7aa5a1021bf7d (diff) | |
Add support for a serial-connected custom debug dongle
This uses the cc1111 board as a custom debug dongle with faster
methods for communicating with the debug target.
Diffstat (limited to 'lib/ccdbg-debug.c')
| -rw-r--r-- | lib/ccdbg-debug.c | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/lib/ccdbg-debug.c b/lib/ccdbg-debug.c index 847361c7..6eb4e0c5 100644 --- a/lib/ccdbg-debug.c +++ b/lib/ccdbg-debug.c @@ -34,11 +34,20 @@ ccdbg_clear_debug(int level)  	ccdbg_level &= ~level;  } +static int initialized; +  void  ccdbg_debug(int level, char *format, ...)  {  	va_list	ap; +	if (!initialized) { +		char *level; +		initialized = 1; +		level = getenv("CCDEBUG"); +		if (level) +			ccdbg_level |= strtoul(level, NULL, 0); +	}  	if (ccdbg_level & level) {  		va_start(ap, format);  		vprintf(format, ap); | 
