/* Configures the: Break feature, dead time, Lock level, the OSSI, the OSSR State and the AOE(automatic output enable).  */
void TIM_BDTRConfig(TIM_TypeDef *tim, TIM_BDTRInitTypeDef *init_struct)
/* Configures the: Break feature, dead time, Lock level, the OSSI, the OSSR State and the AOE(automatic output enable).  */
void TIM_BDTRConfig(TIM_TypeDef *tim, TIM_BDTRInitTypeDef *init_struct)
{
    tim->BDTR = (u32)init_struct->TIM_OSSRState | init_struct->TIM_OSSIState | init_struct->TIM_LOCKLevel |
                init_struct->TIM_DeadTime | init_struct->TIM_Break | init_struct->TIM_BreakPolarity |
                init_struct->TIM_AutomaticOutput;
}