/* Starts the PWM output, and stops after the specified number of pulses. */
void pwmStartFixed(uint32_t pulses)
/* Starts the PWM output, and stops after the specified number of pulses. */
void pwmStartFixed(uint32_t pulses)
{
  pwmMaxPulses = pulses;
  TMR_TMR16B1MCR  |= (TMR_TMR16B1MCR_MR3_INT_ENABLED);
  TMR_TMR16B1TCR = TMR_TMR16B1TCR_COUNTERENABLE_ENABLED;
}