Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1dfd0b9

Browse files
committedJun 10, 2020
Allow overriding timer definitions
Allow TIMER_TONE, TIMER_SERVO and TIMER_SERIAL to be overridden using built_opt.h or similar.
1 parent 28dadd2 commit 1dfd0b9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
 

‎variants/RUMBA32_F446VE/variant.h

+11-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,17 @@ extern "C" {
133133

134134
// Timer Definitions
135135
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
136-
#define TIMER_TONE TIM6
137-
#define TIMER_SERVO TIM7
138-
#define TIMER_SERIAL TIM9
136+
#ifndef TIMER_TONE
137+
#define TIMER_TONE TIM6
138+
#endif
139+
140+
#ifndef TIMER_SERVO
141+
#define TIMER_SERVO TIM7
142+
#endif
143+
144+
#ifndef TIMER_SERIAL
145+
#define TIMER_SERIAL TIM9
146+
#endif
139147

140148
// UART Definitions
141149
#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header

0 commit comments

Comments
 (0)
Please sign in to comment.