X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Flib%2Fdebug%2FDebugC.nc;fp=tos%2Flib%2Fdebug%2FDebugC.nc;h=4e83774ef5e2de9802dea285f5cf43639e1647eb;hp=0000000000000000000000000000000000000000;hb=c40d959ed0b5880f73809836eadddd72a7c277d6;hpb=eb7d4fbd7e465dd1a4a8450111ec93af2dce936b diff --git a/tos/lib/debug/DebugC.nc b/tos/lib/debug/DebugC.nc new file mode 100644 index 00000000..4e83774e --- /dev/null +++ b/tos/lib/debug/DebugC.nc @@ -0,0 +1,37 @@ +/* Copyright (c) 2006-2009 by Sporian Microsystems, Inc. + * All Rights Reserved. + * + * This document is the proprietary and confidential property of Sporian + * Microsystems, Inc. All use, distribution, reproduction or re-distribution + * is disallowed without the prior express written consent of Sporian + * Microsystems, Inc. + */ + +/* A simple debug component. The best use would be to have a PlatformDebugC + * component that either wires to this component or one called NoDebugC + * depending upon compilation options. + */ + +configuration DebugC { + provides interface Debug; +} +implementation +{ +#ifdef SERIAL_DEBUG +#warning "SERIAL DEBUG ON" + + components DebugP; + Debug = DebugP; + + components MainC; + MainC.SoftwareInit -> DebugP; + + components DebugUartC; + DebugP.UartResource -> DebugUartC; + DebugP.UartByte -> DebugUartC; +#else + + components NoDebugP; + Debug = NoDebugP; +#endif +}