Exemplo n.º 1
0
void PWM_Init(void){
	for(uint8_t i=0; i < NUM_OF_MOTORS; i++){
		PWM_CCU4_Init(pwms[i]);
		PWM_CCU4_SetFreqAndDutyCycle(pwms[i], 50, 0);
		PWM_CCU4_Start(pwms[i]);
	}
}
Exemplo n.º 2
0
/*******************************************************************************
 * @brief This function initializes the APPs Init Functions.
 * 
 * @param[in]  None
 *
 * @return  DAVE_STATUS_t <BR>
 ******************************************************************************/
DAVE_STATUS_t DAVE_Init(void)
{
  DAVE_STATUS_t init_status;
  
  init_status = DAVE_STATUS_SUCCESS;

      

/** @Initialization of APPs Init Functions */


  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 APP instance PWM_CCU4_0 */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_CCU4_0);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 APP instance PWM_CCU4_1 */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_CCU4_1);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 APP instance PWM_CCU4_2 */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_CCU4_2);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 APP instance PWM_CCU4_3 */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_CCU4_3);
  }  
 

  return init_status;
} /**  End of function DAVE_Init */