code/atmel_digitalregler/main.cpp
void start_pwm(float dutycycle)
{
  OCR0A   = static_cast<uint16_t>(PWM_16BIT_TOP * dutycycle);
  TCCR0B |= (1 << CS00); //set prescaler to 1 / start timer
}
/* START PWM
 * As the name of the function says, it enables the PWM and sets the duty cycle.
 * This function is separate from the initialization function to achieve a better code-structure.
 */
START PWM
As the name of the function says, it enables the PWM and sets the duty cycle.
This function is separate from the initialization function to achieve a better code-structure.
START PWM As the name of the function says it enables the PWM and sets the duty cycle . This function is separate from the initialization function to achieve a better code - structure .
void start_pwm(float dutycycle)
{
  OCR0A   = static_cast<uint16_t>(PWM_16BIT_TOP * dutycycle);
  TCCR0B |= (1 << CS00); 
}
void start_pwm ( float dutycycle ) { OCR0A = static_cast < uint16_t > ( PWM_16BIT_TOP * dutycycle ) ; TCCR0B |= ( 1 << CS00 ) ; }
START PWM
 As the name of the function says, it enables the PWM and sets the duty cycle.
START PWM As the name of the function says it enables the PWM and sets the duty cycle .
//set prescaler to 1 / start timer