Adds PWM to LoopTiming and CycleStart HAL calls (#693)

This commit is contained in:
Thad House
2017-10-27 19:44:40 -07:00
committed by Peter Johnson
parent f34332643a
commit 90f99dc571
4 changed files with 9 additions and 9 deletions

View File

@@ -80,7 +80,7 @@ void HAL_SetPWMConfig(HAL_DigitalHandle pwmPortHandle, double max,
// calculate the loop time in milliseconds
double loopTime =
HAL_GetLoopTiming(status) / (kSystemClockTicksPerMicrosecond * 1e3);
HAL_GetPWMLoopTiming(status) / (kSystemClockTicksPerMicrosecond * 1e3);
if (*status != 0) return;
int32_t maxPwm = static_cast<int32_t>((max - kDefaultPwmCenter) / loopTime +
@@ -340,12 +340,12 @@ void HAL_SetPWMPeriodScale(HAL_DigitalHandle pwmPortHandle, int32_t squelchMask,
*
* @return The loop time
*/
int32_t HAL_GetLoopTiming(int32_t* status) { return kExpectedLoopTiming; }
int32_t HAL_GetPWMLoopTiming(int32_t* status) { return kExpectedLoopTiming; }
/**
* Get the pwm starting cycle time
*
* @return The pwm cycle start time.
*/
uint64_t HAL_GetCycleStartTime(int32_t* status) { return 0; }
uint64_t HAL_GetPWMCycleStartTime(int32_t* status) { return 0; }
}