Skip to content

Commit 0812f70

Browse files
HardwareTimer: Expose some helper methods
These methods allow access to some of the more low-level values and are useful to implement some more advanced usecases, where the HAL is also directly accessed.
1 parent 95cb038 commit 0812f70

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

cores/arduino/HardwareTimer.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,17 @@ class HardwareTimer {
146146

147147
// The following function(s) are available for more advanced timer options
148148
TIM_HandleTypeDef *getHandle(); // return the handle address for HAL related configuration
149-
150-
private:
151-
TimerModes_t _ChannelMode[TIMER_CHANNELS];
152-
timerObj_t _timerObj;
153-
void (*callbacks[1 + TIMER_CHANNELS])(HardwareTimer *); //Callbacks: 0 for update, 1-4 for channels. (channel5/channel6, if any, doesn't have interrupt)
154149
int getChannel(uint32_t channel);
155150
int getLLChannel(uint32_t channel);
156151
int getIT(uint32_t channel);
157152
int getAssociatedChannel(uint32_t channel);
158153
#if defined(TIM_CCER_CC1NE)
159154
bool isComplementaryChannel[TIMER_CHANNELS];
160155
#endif
156+
private:
157+
TimerModes_t _ChannelMode[TIMER_CHANNELS];
158+
timerObj_t _timerObj;
159+
void (*callbacks[1 + TIMER_CHANNELS])(HardwareTimer *); //Callbacks: 0 for update, 1-4 for channels. (channel5/channel6, if any, doesn't have interrupt)
161160
};
162161

163162
extern timerObj_t *HardwareTimer_Handle[TIMER_NUM];

0 commit comments

Comments
 (0)