|
30 | 30 | /* Includes ------------------------------------------------------------------*/ |
31 | 31 | #include "timer.h" |
32 | 32 | #include "stm32yyxx_ll_tim.h" |
| 33 | +#include "Arduino.h" |
33 | 34 |
|
34 | 35 | #if defined(HAL_TIM_MODULE_ENABLED) && !defined(HAL_TIM_MODULE_ONLY) |
35 | 36 |
|
@@ -138,13 +139,13 @@ class HardwareTimer { |
138 | 139 | uint32_t getOverflow(TimerFormat_t format = TICK_FORMAT); // return overflow depending on format provided |
139 | 140 |
|
140 | 141 | void setPWM(uint32_t channel, PinName pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback = nullptr, callback_function_t CompareCallback = nullptr); // Set all in one command freq in HZ, Duty in percentage. Including both interrupt. |
141 | | - void setPWM(uint32_t channel, uint32_t pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback = nullptr, callback_function_t CompareCallback = nullptr); |
| 142 | + void setPWM(uint32_t channel, pin_size_t pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback = nullptr, callback_function_t CompareCallback = nullptr); |
142 | 143 |
|
143 | 144 | void setCount(uint32_t val, TimerFormat_t format = TICK_FORMAT); // set timer counter to value 'val' depending on format provided |
144 | 145 | uint32_t getCount(TimerFormat_t format = TICK_FORMAT); // return current counter value of timer depending on format provided |
145 | 146 |
|
146 | 147 | void setMode(uint32_t channel, TimerModes_t mode, PinName pin = NC, ChannelInputFilter_t filter = FILTER_NONE); // Configure timer channel with specified mode on specified pin if available |
147 | | - void setMode(uint32_t channel, TimerModes_t mode, uint32_t pin, ChannelInputFilter_t filter = FILTER_NONE); |
| 148 | + void setMode(uint32_t channel, TimerModes_t mode, pin_size_t pin, ChannelInputFilter_t filter = FILTER_NONE); |
148 | 149 |
|
149 | 150 | TimerModes_t getMode(uint32_t channel); // Retrieve configured mode |
150 | 151 |
|
|
0 commit comments