/* Returns actual value of the capture register of the designated capture unit.  */
uint32_t HRTIM_GetCapturedValue(HRTIM_TypeDef *HRTIMx, uint32_t TimerIdx, uint32_t CaptureUnit)
/* Returns actual value of the capture register of the designated capture unit.  */
uint32_t HRTIM_GetCapturedValue(HRTIM_TypeDef *HRTIMx, uint32_t TimerIdx, uint32_t CaptureUnit)
{
  uint32_t captured_value = 0;
  assert_param(IS_HRTIM_TIMING_UNIT(TimerIdx));
  assert_param(IS_HRTIM_CAPTUREUNIT(CaptureUnit));
  switch (CaptureUnit)
  {
    case HRTIM_CAPTUREUNIT_1:
    {
      captured_value = HRTIMx->HRTIM_TIMERx[TimerIdx].CPT1xR;
    }
    break;
    case HRTIM_CAPTUREUNIT_2:
    {
      captured_value = HRTIMx->HRTIM_TIMERx[TimerIdx].CPT2xR;
    }
    break;
    default:
    break;
  }
  return captured_value; 
}