drivers/pwm/pwm_k64_ftm.c
/**
 * @brief Enable the clock for the FTM subsystem
 *
 * This function must be called before writing to FTM registers.  Failure to
 * do so may result in bus fault.
 *
 * @param ftm_num index indicating which FTM
 *
 * @return 0 if successful, failed otherwise
 */
@brief Enable the clock for the FTM subsystem
This function must be called before writing to FTM registers.  Failure to
do so may result in bus fault.

@param ftm_num index indicating which FTM

@return 0 if successful, failed otherwise
@brief Enable the clock for the FTM subsystem This function must be called before writing to FTM registers . Failure to do so may result in bus fault . @param ftm_num index indicating which FTM @return 0 if successful failed otherwise
static int pwm_ftm_clk_enable(u8_t ftm_num)
{
	volatile struct K20_SIM *sim =
		(volatile struct K20_SIM *)PERIPH_ADDR_BASE_SIM; 
	if (ftm_num > 3) {
		SYS_LOG_ERR("Illegal FTM number (%d).\n  Cannot enable PWM "
			    "clock", ftm_num);
		return -EINVAL;
	}
	sim->scgc6 |= 1 << (24 + ftm_num);
	return 0;
}
static int pwm_ftm_clk_enable ( u8_t ftm_num ) { volatile struct K20_SIM * sim = ( volatile struct K20_SIM * ) PERIPH_ADDR_BASE_SIM ; if ( ftm_num > 3 ) { SYS_LOG_ERR ( " \n " " " , ftm_num ) ; return - EINVAL ; } sim -> scgc6 |= 1 << ( 24 + ftm_num ) ; return 0 ; }
@brief Enable the clock for the FTM subsystem
 This function must be called before writing to FTM registers.
@brief Enable the clock for the FTM subsystem This function must be called before writing to FTM registers .
/* sys integ. ctl */ /* enabling the FTM by setting one of the bits SIM_SCGC6[26:24] */