Added a function for setting promiscous mode on the CC2538 RF core

This commit is contained in:
Adam Dunkels 2013-11-22 18:04:23 +01:00
parent 473d519926
commit 76f2a10c9a

View file

@ -745,5 +745,14 @@ cc2538_rf_err_isr(void)
ENERGEST_OFF(ENERGEST_TYPE_IRQ);
}
/*---------------------------------------------------------------------------*/
void
cc2538_rf_set_promiscous_mode(char p)
{
if(p) {
REG(RFCORE_XREG_FRMFILT0) &= ~RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN;
} else {
REG(RFCORE_XREG_FRMFILT0) |= RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN;
}
}
/*---------------------------------------------------------------------------*/
/** @} */