drivers/pwm/pwm_k64_ftm.c
/**
 * @brief API call to disable FTM
 *
 * This function simply sets the clock source to "no clock selected" thus
 * disabling the FTM
 *
 * @param dev Device struct
 * @return 0 if successful, failed otherwise
 */
@brief API call to disable FTM
This function simply sets the clock source to "no clock selected" thus
disabling the FTM

@param dev Device struct
@return 0 if successful, failed otherwise
@brief API call to disable FTM This function simply sets the clock source to " no clock selected " thus disabling the FTM @param dev Device struct @return 0 if successful failed otherwise
static int pwm_ftm_suspend(struct device *dev)
{
	u32_t reg_val;
	const struct pwm_ftm_config * const config =
		dev->config->config_info;
	SYS_LOG_DBG("...");
	reg_val = sys_read32(PWM_K64_FTM_SC(config->reg_base));
	reg_val &= ~PWM_K64_FTM_SC_CLKS_MASK;
	reg_val |= PWM_K64_FTM_SC_CLKS_DISABLE;
	sys_write32(reg_val, PWM_K64_FTM_SC(config->reg_base));
	pwm_ftm_set_power_state(DEVICE_PM_SUSPEND_STATE);
	SYS_LOG_DBG("done.");
	return 0;
}
static int pwm_ftm_suspend ( struct device * dev ) { u32_t reg_val ; const struct pwm_ftm_config * const config = dev -> config -> config_info ; SYS_LOG_DBG ( " " ) ; reg_val = sys_read32 ( PWM_K64_FTM_SC ( config -> reg_base ) ) ; reg_val &= ~ PWM_K64_FTM_SC_CLKS_MASK ; reg_val |= PWM_K64_FTM_SC_CLKS_DISABLE ; sys_write32 ( reg_val , PWM_K64_FTM_SC ( config -> reg_base ) ) ; pwm_ftm_set_power_state ( DEVICE_PM_SUSPEND_STATE ) ; SYS_LOG_DBG ( " " ) ; return 0 ; }
@brief API call to disable FTM
 This function simply sets the clock source to "no clock selected" thus
 disabling the FTM
@brief API call to disable FTM This function simply sets the clock source to " no clock selected " thus disabling the FTM
/* set clock source to "no clock selected" */