From 1575222e4e9762e88de999fbc3207b1907fe4181 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 13 Mar 2018 20:10:46 +0100 Subject: [PATCH] JN516x SDK 4170 build 1745 does not have vMMAC_SetChannel() function - use only vMMAC_SetChannelAndPower() - remove redundant call in init() --- arch/platform/jn516x/dev/micromac-radio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/platform/jn516x/dev/micromac-radio.c b/arch/platform/jn516x/dev/micromac-radio.c index c3117c6f8..3ebc13578 100644 --- a/arch/platform/jn516x/dev/micromac-radio.c +++ b/arch/platform/jn516x/dev/micromac-radio.c @@ -278,8 +278,7 @@ init(void) vMMAC_EnableInterrupts(&radio_interrupt_handler); } vMMAC_ConfigureRadio(); - set_channel(current_channel); - set_txpower(current_tx_power); + set_txpower(current_tx_power); /* it sets also the current_channel */ vMMAC_GetMacAddress(&node_long_address); /* Short addresses are disabled by default */ @@ -493,8 +492,7 @@ void set_channel(int c) { current_channel = c; - /* will fine tune TX power as well */ - vMMAC_SetChannel(current_channel); + vMMAC_SetChannelAndPower(current_channel, current_tx_power); } /*---------------------------------------------------------------------------*/ #if !MICROMAC_RADIO_MAC