Skip to content

Commit f4b8a7d

Browse files
committed
Hotfix timer compilation for some E50x series boards
1 parent d0326b6 commit f4b8a7d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cores/arduino/gd32/timer.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ OF SUCH DAMAGE.
7272

7373
#if defined(GD32E50X)
7474
#define TIMER7_IRQ_NAME TIMER7_Channel_IRQn
75+
#define TIMER8_IRQ_NAME TIMER0_BRK_TIMER8_IRQn
7576
#if defined(GD32E50X_XD) || defined(GD32E50X_CL) || defined(GD32E508)
7677
#define TIMER7_UP_IRQ_NAME TIMER7_UP_TIMER12_IRQn
7778
#define TIMER10_IRQ_NAME TIMER0_TRG_CMT_TIMER10_IRQn
@@ -1101,7 +1102,11 @@ IRQn_Type getTimerUpIrq(uint32_t tim)
11011102
#endif
11021103
#if defined(TIMER8) && defined(HAS_TIMER_8)
11031104
case (uint32_t)TIMER8:
1105+
#ifdef TIMER8_IRQ_NAME //TODO: repeat this for other timers...
1106+
IRQn = TIMER8_IRQ_NAME;
1107+
#else
11041108
IRQn = TIMER8_IRQn;
1109+
#endif
11051110
break;
11061111
#endif
11071112
#if defined(TIMER9) && defined(HAS_TIMER_9)

0 commit comments

Comments
 (0)