/* Configures a Timer to emulate an encoder sensor outputs in Forward direction.  */
static void Emulate_Forward_Direction(TIM_HandleTypeDef *htim)
/* Configures a Timer to emulate an encoder sensor outputs in Forward direction.  */
static void Emulate_Forward_Direction(TIM_HandleTypeDef *htim)
{   
  sConfig.Pulse = (EMU_PERIOD * 1 )/4;
  if(HAL_TIM_OC_ConfigChannel(htim, &sConfig, TIM_CHANNEL_1) != HAL_OK)
  {
    Error_Handler();
  }
  sConfig.Pulse = (EMU_PERIOD * 3 )/4;
  if(HAL_TIM_OC_ConfigChannel(htim, &sConfig, TIM_CHANNEL_2) != HAL_OK)
  {
    Error_Handler();
  } 
  if(HAL_TIM_OC_Start(htim, TIM_CHANNEL_1) != HAL_OK)
  {
    Error_Handler();
  }
  if(HAL_TIM_OC_Start(htim, TIM_CHANNEL_2) != HAL_OK)
  {
    Error_Handler();
  }  
}