/* Changes the duty cycle of the PWM signal. D = (T/P)*100 where T is the pulse duration and P is the PWM signal period.  */
__STATIC_INLINE void Configure_DutyCycle(uint32_t D)
/* Changes the duty cycle of the PWM signal. D = (T/P)*100 where T is the pulse duration and P is the PWM signal period.  */
__STATIC_INLINE void Configure_DutyCycle(uint32_t D)
{
  uint32_t P;
  uint32_t T;
  T = LL_TIM_GetAutoReload(TIM2) + 1;
  P = (D*T)/100;
  LL_TIM_OC_SetCompareCH1(TIM2, P);
}