Skip to content

Commit

Permalink
overflow value uint32_t -> uint64_t fix stm32duino#2071
Browse files Browse the repository at this point in the history
  • Loading branch information
GianfrancoIU1JSU committed Jul 16, 2023
1 parent 8ff274a commit 4c5ac62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cores/arduino/HardwareTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class HardwareTimer {
void setPrescaleFactor(uint32_t prescaler); // set prescaler register (which is factor value - 1)
uint32_t getPrescaleFactor();

void setOverflow(uint32_t val, TimerFormat_t format = TICK_FORMAT); // set AutoReload register depending on format provided
void setOverflow(uint64_t val, TimerFormat_t format = TICK_FORMAT); // set AutoReload register depending on format provided
uint32_t getOverflow(TimerFormat_t format = TICK_FORMAT); // return overflow depending on format provided

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.
Expand Down
2 changes: 1 addition & 1 deletion libraries/SrcWrapper/src/HardwareTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ uint32_t HardwareTimer::getOverflow(TimerFormat_t format)
* HERTZ_FORMAT: overflow is the frequency in hertz for overflow
* @retval None
*/
void HardwareTimer::setOverflow(uint32_t overflow, TimerFormat_t format)
void HardwareTimer::setOverflow(uint64_t overflow, TimerFormat_t format)
{
uint32_t ARR_RegisterValue;
uint32_t PeriodTicks;
Expand Down

0 comments on commit 4c5ac62

Please sign in to comment.