Skip to content

Commit

Permalink
GD32 hwtimer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehaenger committed Sep 24, 2023
1 parent d2a9a22 commit f06bf44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Firmware/CoverUI/YardForce/hwtimer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ HardwareTimer *hwtimer(TIM_TypeDef *instance, uint32_t freq, callback_function_t

#else // ---------- GD32 ----------

HardwareTimer *hwtimer(uint32_t instance, uint32_t freq, timerCallback_t callback)
HardwareTimer *hwtimer(uint32_t instance, uint32_t freq, timerCallback_t callback, uint32_t preemptPriority = 0, uint32_t subPriority = 0)
{
HardwareTimer *Timer = new HardwareTimer(instance);
Timer->setPeriodTime(freq, FORMAT_HZ);
// TODO: Add INT preemption- and sub- priorities
// FIXME: GD's HW timer class doesn't has INT preemption- and sub- priorities implemented yet. Will become an issue latest with GD32 & LVGL!
Timer->attachInterrupt(callback);
Timer->start();
return Timer;
Expand Down

0 comments on commit f06bf44

Please sign in to comment.