/* Set the Master Mode. 
This sets the Trigger Output TRGO for synchronizing with slave timers or passing as an internal trigger to the ADC or DAC. */
void timer_set_master_mode(uint32_t timer_peripheral, uint32_t mode)
/* Set the Master Mode. 
This sets the Trigger Output TRGO for synchronizing with slave timers or passing as an internal trigger to the ADC or DAC. */
void timer_set_master_mode(uint32_t timer_peripheral, uint32_t mode)
{
	TIM_CR2(timer_peripheral) &= ~TIM_CR2_MMS_MASK;
	TIM_CR2(timer_peripheral) |= mode;
}