/*FUNCTION********************************************************************** * * Function Name : SIM_HAL_SetFtmSyncCmd * Description : Set FTMxSYNCBIT * This function sets FlexTimer x hardware trigger 0 software synchronization. * *END**************************************************************************/ void SIM_HAL_SetFtmSyncCmd(SIM_Type * base, uint32_t instance, bool sync) { assert (instance < FTM_INSTANCE_COUNT); if (sync) { SIM_SET_SOPT8(base, (1U<<instance)); } else { SIM_CLR_SOPT8(base, (1U<<instance)); } }
/*FUNCTION********************************************************************** * * Function Name : SIM_HAL_SetFtmChOutSrcMode * Description : FlexTimer x channel y output source select setting. * This function will select FlexTimer x channel y output source * *END**************************************************************************/ void SIM_HAL_SetFtmChOutSrcMode(SIM_Type * base, uint32_t instance, uint8_t channel, sim_ftm_ch_out_src_t select) { assert (0U==instance); assert (8U>channel); if (kSimFtmChOutSrc0 == select) { SIM_CLR_SOPT8(base, FTM_CH_OUT_SRC_MASK(instance, channel)); } else { SIM_SET_SOPT8(base, FTM_CH_OUT_SRC_MASK(instance, channel)); } }