Merge pull request #348 from perexg/jn516x-set-channel-fix

JN516x SDK 4170 build 1745 does not have vMMAC_SetChannel() function
This commit is contained in:
George Oikonomou 2018-03-13 22:47:18 +00:00 committed by GitHub
commit f8bc9aabd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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