Skip to content

Commit 2c998eb

Browse files
Add return descriptor & default argument.
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
1 parent e6a4276 commit 2c998eb

1 file changed

Lines changed: 2 additions & 21 deletions

File tree

include/core/manager.hpp

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ RTC& getRTC() {
131131
* @tparam mcuTimer The microcontroller timer that the timer will run on.
132132
* @param clockPeriod The clock period to run the timer at
133133
* @param configuration Configuration variables for the timer.
134-
* @return
134+
* @return a configured timer object, with the given configuration & clock period.
135135
*/
136136
template<MCUTimer mcuTimer>
137-
Timer& getTimer(uint32_t clockPeriod, TimerConfiguration_t configuration) {
137+
Timer& getTimer(uint32_t clockPeriod, TimerConfiguration_t configuration = TimerF3xx::defaultConfig) {
138138
#ifdef STM32F3xx
139139
static TimerF3xx timer(getTIM(mcuTimer), clockPeriod, configuration);
140140
return timer;
@@ -144,25 +144,6 @@ Timer& getTimer(uint32_t clockPeriod, TimerConfiguration_t configuration) {
144144
return timer;
145145
#endif
146146
}
147-
148-
/**
149-
* A simple method for getting an EVT-Core timer. This timer will be initialized with default configuration options.
150-
*
151-
* @tparam mcuTimer The microcontroller timer that the timer will run on.
152-
* @param clockPeriod The clock period to run the timer at
153-
* @return
154-
*/
155-
template<MCUTimer mcuTimer>
156-
Timer& getTimer(uint32_t clockPeriod) {
157-
#ifdef STM32F3xx
158-
static TimerF3xx timer(getTIM(mcuTimer), clockPeriod, TimerF3xx::defaultConfig);
159-
return timer;
160-
#endif
161-
#ifdef STM32F4xx
162-
static TimerF4xx timer(getTIM(mcuTimer), clockPeriod, TimerF4xx::defaultConfig);
163-
return timer;
164-
#endif
165-
}
166147
#endif
167148

168149
} // namespace core::dev

0 commit comments

Comments
 (0)