/* Triggers a software capture on the designed capture unit.  */
void HRTIM_SoftwareCapture(HRTIM_TypeDef *HRTIMx, uint32_t TimerIdx, uint32_t CaptureUnit)
/* Triggers a software capture on the designed capture unit.  */
void HRTIM_SoftwareCapture(HRTIM_TypeDef *HRTIMx, uint32_t TimerIdx, uint32_t CaptureUnit)
{
  assert_param(IS_HRTIM_TIMING_UNIT(TimerIdx));
  assert_param(IS_HRTIM_CAPTUREUNIT(CaptureUnit));
  switch (CaptureUnit)
  {
    case HRTIM_CAPTUREUNIT_1:
    {
      HRTIMx->HRTIM_TIMERx[TimerIdx].CPT1xCR |= HRTIM_CPT1CR_SWCPT;
    }
    break;
    case HRTIM_CAPTUREUNIT_2:
    {
      HRTIMx->HRTIM_TIMERx[TimerIdx].CPT2xCR |= HRTIM_CPT2CR_SWCPT;
    }
    break;
    default:
    break;
  }
}