1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #6685 from smlng/pr/cc2538/fix_timer_set

cc2538: fix timer_set for channel B
This commit is contained in:
Alexandre Abadie 2017-03-02 18:32:13 +01:00 committed by GitHub
commit acfabcfde2

View File

@ -174,7 +174,7 @@ int timer_set(tim_t dev, int channel, unsigned int timeout)
gptimer->ICR = TBMIM;
/* set timeout value */
gptimer->TAMATCHR = (gptimer->CFG == GPTMCFG_32_BIT_TIMER)? (gptimer->TBV + timeout) : (gptimer->TBV - timeout);
gptimer->TBMATCHR = (gptimer->CFG == GPTMCFG_32_BIT_TIMER)? (gptimer->TBV + timeout) : (gptimer->TBV - timeout);
gptimer->cc2538_gptimer_imr.IMR |= TBMIM; /**< Enable the Timer B Match Interrupt */
break;
}