Skip to content

Commit 32fa118

Browse files
committed
[stm32] Add advanced timer isOutputEnabled()
1 parent 6b1f001 commit 32fa118

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/modm/platform/timer/stm32/advanced.hpp.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ public:
255255
TIM{{ id }}->BDTR &= ~(TIM_BDTR_MOE);
256256
}
257257

258+
static inline bool
259+
isOutputEnabled()
260+
{
261+
return (TIM{{ id }}->BDTR & TIM_BDTR_MOE);
262+
}
263+
258264
/*
259265
* Enable/Disable automatic set of MOE bit at the next update event
260266
*/

src/modm/platform/timer/stm32/general_purpose.hpp.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ public:
289289
TIM{{ id }}->BDTR &= ~(TIM_BDTR_MOE);
290290
}
291291

292+
static inline bool
293+
isOutputEnabled()
294+
{
295+
return (TIM{{ id }}->BDTR & TIM_BDTR_MOE);
296+
}
297+
292298
/*
293299
* Enable/Disable automatic set of MOE bit at the next update event
294300
*/

0 commit comments

Comments
 (0)