Update timer.h

fix compile error
This commit is contained in:
stevstrong 2018-04-13 18:26:45 +02:00 committed by GitHub
parent 407df21dfb
commit 50ed00effc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -843,7 +843,7 @@ static inline void timer_dma_disable_req(timer_dev *dev, uint8 channel) {
*/
static inline void timer_enable_irq(timer_dev *dev, uint8 interrupt) {
// clear interrupt flag, use different masks for reserved bits
dev->regs->SR = (~BIT(interrupt)) & ( (dev->type==TIMER_ADVANCED) ? 0x1EFF :
(dev->regs).adv->SR = (~BIT(interrupt)) & ( (dev->type==TIMER_ADVANCED) ? 0x1EFF :
( (dev->type==TIMER_GENERAL) ? 0x1E5F : 0x0001) );
*bb_perip(&(dev->regs).adv->DIER, interrupt) = 1;
}