[riot-notifications] [RIOT] clean up transceiver (#95)

LudwigOrtmann notifications at github.com
Tue Aug 6 18:12:02 CEST 2013

The sys/transceiver.c code is a little messy with regard to ifdefs.

static int16_t set_address(transceiver_type_t t, void *address) {
    switch(t) {
        case TRANSCEIVER_CC1100:
#ifdef MODULE_CC110X_NG
            return cc110x_set_address(addr);
#elif MODULE_CC110X
            return cc1100_set_address(addr);
        case TRANSCEIVER_CC2420:
#ifdef MODULE_CC2420
            return cc2420_set_address(addr);
            return -1;
In this case, if neither `MODULE_CC110X_NG` nor `MODULE_CC110X` are defined, but `MODULE_CC242`0 is, `return cc2420_set_address(...)` is called instead of `return -1` for `t == TRANSCEIVER_CC1100`. This probably doesn't make much sense.

Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130806/67ee63a8/attachment.html>

More information about the notifications mailing list