3636#define TIMER_CHANNELS 4 // channel5 and channel 6 are not considered here has they don't have gpio output and they don't have interrupt
3737
3838typedef enum {
39- TIMER_DISABLED, // == TIM_OCMODE_TIMING no output, useful for only-interrupt
39+ TIMER_OUTPUT_DISABLED, // == TIM_OCMODE_TIMING no output, useful for only-interrupt
4040 // Output Compare
41- TIMER_OUTPUT_COMPARE, // == Obsolete, use TIMER_DISABLED instead. Kept for compatibility reason
4241 TIMER_OUTPUT_COMPARE_ACTIVE, // == TIM_OCMODE_ACTIVE pin is set high when counter == channel compare
4342 TIMER_OUTPUT_COMPARE_INACTIVE, // == TIM_OCMODE_INACTIVE pin is set low when counter == channel compare
4443 TIMER_OUTPUT_COMPARE_TOGGLE, // == TIM_OCMODE_TOGGLE pin toggles when counter == channel compare
@@ -60,6 +59,10 @@ typedef enum {
6059 TIMER_NOT_USED = 0xFFFF // This must be the last item of this enum
6160} TimerModes_t;
6261
62+ // Backward compatibility
63+ #define TIMER_DISABLED TIMER_OUTPUT_DISABLED
64+ #define TIMER_OUTPUT_COMPARE TIMER_OUTPUT_DISABLED
65+
6366typedef enum {
6467 TICK_FORMAT, // default
6568 MICROSEC_FORMAT,
@@ -177,10 +180,10 @@ class HardwareTimer {
177180
178181 // The following function(s) are available for more advanced timer options
179182 TIM_HandleTypeDef *getHandle (); // return the handle address for HAL related configuration
180- int getChannel (uint32_t channel);
181- int getLLChannel (uint32_t channel);
182- int getIT (uint32_t channel);
183- int getAssociatedChannel (uint32_t channel);
183+ uint32_t getChannel (uint32_t channel);
184+ uint32_t getLLChannel (uint32_t channel);
185+ uint32_t getIT (uint32_t channel);
186+ uint32_t getAssociatedChannel (uint32_t channel);
184187
185188 private:
186189 // Store for each channel if regular, complementary or both are used
0 commit comments