cc2420 and cc2430: add comment on why we discard tbiv
This commit is contained in:
parent
343326abee
commit
ca8fe618e7
|
@ -45,6 +45,7 @@ ISR(TIMERB1, cc2420_timerb1_interrupt)
|
|||
ENERGEST_ON(ENERGEST_TYPE_IRQ);
|
||||
/* always read TBIV to clear IFG */
|
||||
tbiv = TBIV;
|
||||
/* read and discard tbiv to avoid "variable set but not used" warning */
|
||||
(void)tbiv;
|
||||
if(CC2420_SFD_IS_1) {
|
||||
cc2420_sfd_counter++;
|
||||
|
|
|
@ -44,6 +44,7 @@ ISR(TIMERB1, cc2520_timerb1_interrupt)
|
|||
ENERGEST_ON(ENERGEST_TYPE_IRQ);
|
||||
/* always read TBIV to clear IFG */
|
||||
tbiv = TBIV;
|
||||
/* read and discard tbiv to avoid "variable set but not used" warning */
|
||||
(void)tbiv;
|
||||
if(CC2520_SFD_IS_1) {
|
||||
cc2520_sfd_counter++;
|
||||
|
|
|
@ -217,6 +217,7 @@ flushrx(void)
|
|||
uint8_t dummy;
|
||||
|
||||
CC2520_READ_FIFO_BYTE(dummy);
|
||||
/* read and discard dummy to avoid "variable set but not used" warning */
|
||||
(void)dummy;
|
||||
CC2520_STROBE(CC2520_INS_SFLUSHRX);
|
||||
CC2520_STROBE(CC2520_INS_SFLUSHRX);
|
||||
|
|
Loading…
Reference in a new issue