You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cores/arduino/HardwareTimer.h
+7-9Lines changed: 7 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -112,15 +112,15 @@ class HardwareTimer {
112
112
voidsetPWM(uint32_t channel, PinName pin, uint32_t frequency, uint32_t dutycycle, void (*PeriodCallback)(HardwareTimer *) = NULL, void (*CompareCallback)(HardwareTimer *) = NULL); // Set all in one command freq in HZ, Duty in percentage. Including both interrup.
uint32_tgetCaptureCompare(uint32_t channel, TimerCompareFormat_t format = TICK_COMPARE_FORMAT); //return Capture/Compare register value of specified channel depending on format provided
uint32_tgetCaptureCompare(uint32_t channel, TimerCompareFormat_t format = TICK_COMPARE_FORMAT); // return Capture/Compare register value of specified channel depending on format provided
124
124
voidsetCaptureCompare(uint32_t channel, uint32_t compare, TimerCompareFormat_t format = TICK_COMPARE_FORMAT); // set Compare register value of specified channel depending on format provided
125
125
126
126
voidsetInterruptPriority(uint32_t preemptPriority, uint32_t subPriority); // set interrupt priority
@@ -139,26 +139,24 @@ class HardwareTimer {
139
139
// Refresh() is usefull while timer is running after some registers update
140
140
voidrefresh(void); // Generate update event to force all registers (Autoreload, prescaler, compare) to be taken into account
141
141
142
-
143
142
uint32_tgetTimerClkFreq(); // return timer clock frequency in Hz.
144
143
145
144
staticvoidcaptureCompareCallback(TIM_HandleTypeDef *htim); // Generic Caputre and Compare callback which will call user callback
146
145
staticvoidupdateCallback(TIM_HandleTypeDef *htim); // Generic Update (rollover) callback which will call user callback
147
146
148
147
// The following function(s) are available for more advanced timer options
149
148
TIM_HandleTypeDef *getHandle(); // return the handle address for HAL related configuration
150
-
151
-
private:
152
-
TimerModes_t _ChannelMode[TIMER_CHANNELS];
153
-
timerObj_t _timerObj;
154
-
void (*callbacks[1 + TIMER_CHANNELS])(HardwareTimer *); //Callbacks: 0 for update, 1-4 for channels. (channel5/channel6, if any, doesn't have interrupt)
155
149
intgetChannel(uint32_t channel);
156
150
intgetLLChannel(uint32_t channel);
157
151
intgetIT(uint32_t channel);
158
152
intgetAssociatedChannel(uint32_t channel);
159
153
#if defined(TIM_CCER_CC1NE)
160
154
bool isComplementaryChannel[TIMER_CHANNELS];
161
155
#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)
0 commit comments