timer: save alarm value in driver layer

This commit is contained in:
morris
2021-12-17 09:57:27 +08:00
parent b170aba93a
commit 2c810f8451
8 changed files with 17 additions and 90 deletions

View File

@@ -147,18 +147,6 @@ static inline void timer_ll_set_alarm_value(timg_dev_t *hw, uint32_t timer_num,
hw->hw_timer[timer_num].alarmlo.tx_alarm_lo = (uint32_t) alarm_value;
}
/**
* @brief Get alarm value
*
* @param hw Timer Group register base address
* @param timer_num Timer number in the group
* @return Counter value to trigger the alarm event
*/
static inline uint64_t timer_ll_get_alarm_value(timg_dev_t *hw, uint32_t timer_num)
{
return ((uint64_t) hw->hw_timer[timer_num].alarmhi.tx_alarm_hi << 32) | (hw->hw_timer[timer_num].alarmlo.tx_alarm_lo);
}
/**
* @brief Set reload value
*