/* Configures the tim event to be generate by software.  */
void TIM_GenerateEvent(TIM_TypeDef *tim, TIMEGR_Typedef source)
/* Configures the tim event to be generate by software.  */
void TIM_GenerateEvent(TIM_TypeDef *tim, TIMEGR_Typedef source)
{
    WRITE_REG(tim->EGR, source);
}