contiki-os/contiki — pull request #78 by g-oikonomou (2013-01-10 00:25:35+00:00)
Title: We can now turn off example-provided putchars

The two examples using SLIP (rpl-border-router and slip-radio) make the assumption that SLIP and debugging output will always be over the same peripheral and provide their own implementation of putchar to handle SLIP/putchar multiplexing.

This assumption may have been true during Contiki's earlier days. However, new hardware keeps coming out with on-chip USB controllers and this assumption is now becoming increasingly questionable. For example, one may wish to send debugging over UART and SLIP over USB, in which case those putchar implementations only get in the way.

This little patch wraps the two putchars in #if guards, allowing the platform maintainer to provide a platform-specific way to handle things, if so desired.

This is implemented in the least disruptive way possible; the examples will behave in exactly the same fashion as they did before the patch, unless a platform's contiki-conf.h explicitly tells us to do otherwise.