Timer DMA functions.
Adding 2 functions to enable and disable Timer peripheral DMA requests on update event.
This commit is contained in:
parent
18a3dd1118
commit
e7abad654e
|
@ -785,6 +785,22 @@ static inline void timer_dma_disable_trg_req(timer_dev *dev) {
|
|||
*bb_perip(&(dev->regs).gen->DIER, TIMER_DIER_TDE_BIT) = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable a timer's update DMA request
|
||||
* @param dev Timer device, must have type TIMER_ADVANCED or TIMER_GENERAL
|
||||
*/
|
||||
static inline void timer_dma_enable_upd_req(timer_dev *dev) {
|
||||
*bb_perip(&(dev->regs).gen->DIER, TIMER_DIER_UDE_BIT) = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable a timer's update DMA request
|
||||
* @param dev Timer device, must have type TIMER_ADVANCED or TIMER_GENERAL
|
||||
*/
|
||||
static inline void timer_dma_disable_upd_req(timer_dev *dev) {
|
||||
*bb_perip(&(dev->regs).gen->DIER, TIMER_DIER_UDE_BIT) = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable a timer channel's DMA request.
|
||||
* @param dev Timer device, must have type TIMER_ADVANCED or TIMER_GENERAL
|
||||
|
|
Loading…
Reference in New Issue