cc2420 and cc2430: add comment on why we discard tbiv

This commit is contained in:
Simon Duquennoy 2015-10-06 16:12:24 +02:00
parent 343326abee
commit ca8fe618e7
3 changed files with 3 additions and 0 deletions

View File

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

View File

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

View File

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