X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fmac%2Ftkn154%2FDebugP.nc;h=954e516cff28b5b56c8d3c6eecefd2839800c630;hb=519673769e4a40805dc68b99f9e9ceb739d64800;hp=8cad827c15de6f69a52cdc75385e01224743d803;hpb=c5a0fd261d8ad2a813b54c5add6336d95cda43ed;p=tinyos-2.x.git diff --git a/tos/lib/mac/tkn154/DebugP.nc b/tos/lib/mac/tkn154/DebugP.nc index 8cad827c..954e516c 100644 --- a/tos/lib/mac/tkn154/DebugP.nc +++ b/tos/lib/mac/tkn154/DebugP.nc @@ -40,9 +40,18 @@ #else #include #endif +#if defined(PLATFORM_TELOSB) +#include +#endif module DebugP { - uses interface Leds; + uses { + interface Boot; + interface Leds; +#if defined(PLATFORM_TELOSB) + interface Notify as ButtonPressed; +#endif + } } implementation { @@ -70,6 +79,19 @@ implementation { norace char m_assertFilename[MAX_LEN_FILENAME]; norace char m_assertFunction[MAX_LEN_FUNNAME]; + event void Boot.booted() { +#if defined(PLATFORM_TELOSB) + call ButtonPressed.enable(); +#endif + } + +#if defined(PLATFORM_TELOSB) + event void ButtonPressed.notify( button_state_t val ) + { + dbg_serial_flush(); + } +#endif + task void assertFailTask() { if (m_assertCounter == 0) {