Project 3
Seven-Segment Display
|
Neff Site |
This module implements a PWM driver. More...
Go to the source code of this file.
Macros | |
#define | PWM_PORT PORTF |
#define | PWM_CCEN TC0_CCCEN_bm |
#define | PWM_CCREG CCC |
#define | PWM_MODULE TCF0 |
#define | PWM_PIN_bm PIN2_bm |
Functions | |
void | pwm_init (void) |
Initialize PWM module. More... | |
void | pwm_stop (void) |
Stop the modulation. More... | |
void | pwm_start (void) |
Start the modulation. More... | |
void | pwm_duty (uint8_t duty) |
Set the duty cycle. More... | |
This module implements a PWM driver.
#define PWM_CCEN TC0_CCCEN_bm |
#define PWM_CCREG CCC |
#define PWM_MODULE TCF0 |
#define PWM_PIN_bm PIN2_bm |
#define PWM_PORT PORTF |
void pwm_duty | ( | uint8_t | duty | ) |
Set the duty cycle.
Sets the duty cycle of the pulse width modulated signal.
duty | The duty cycle per cent. |
void pwm_init | ( | void | ) |
Initialize PWM module.
Initializes the PWM module but does not yet start the modulation.
void pwm_start | ( | void | ) |
Start the modulation.
Start the modulation on the oscillator pin.
void pwm_stop | ( | void | ) |
Stop the modulation.
Stops the modulations, clears the oscillator pin and resets the PWM timer.
Contact | Generated by 1.8.13 |