Merge pull request #375 from stevstrong/patch-3

Update timer.h to fix issue with false interrupt when first enabling it
This commit is contained in:
Roger Clark 2017-11-14 09:12:11 +11:00 committed by GitHub
commit bb75679b54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -828,6 +828,7 @@ static inline void timer_dma_disable_req(timer_dev *dev, uint8 channel) {
* @see timer_channel
*/
static inline void timer_enable_irq(timer_dev *dev, uint8 interrupt) {
*bb_perip(&(dev->regs).adv->SR, interrupt) = 0; // clear interrupt flag
*bb_perip(&(dev->regs).adv->DIER, interrupt) = 1;
}