#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "boolean.h"
#include "message_queue.h"
#include "pwm_timer.h"
#include "config_pwm_timer_impl.h"
Go to the source code of this file.
Data Structures | |
struct | S_pwm_Timer_GlobalData |
Structure to contain the global data for the timer. More... | |
Typedefs | |
typedef S_pwm_Timer_GlobalData | pwm_Timer_GlobalData |
Structure to contain the global data for the timer. | |
Functions | |
void | pwm_Timer_init (void) |
Initialize the PWM-Timer. | |
void | pwm_Timer_cleanup (void) |
Clean up the timer. | |
void | pwm_Timer_idle (void) |
Do nothing. | |
SIGNAL (SIG_OUTPUT_COMPARE1A) | |
Timer interrupt routine. |
Definition in file pwm_timer.c.
typedef struct S_pwm_Timer_GlobalData pwm_Timer_GlobalData |
Structure to contain the global data for the timer.
void pwm_Timer_cleanup | ( | void | ) |
Clean up the timer.
Basically, the message-queue is cleaned.
Definition at line 60 of file pwm_timer.c.
References messageQueue_cleanup().
Referenced by pwm_Channels_cleanup().
void pwm_Timer_idle | ( | void | ) |
void pwm_Timer_init | ( | void | ) |
Initialize the PWM-Timer.
Sets basic values, starts the timer and initializes output-pins.
Definition at line 35 of file pwm_timer.c.
References CHANNELS, S_pwm_Timer_GlobalData::currentCycle, S_pwm_Channels_Step::cycle, False, S_pwm_Channels_Step::field, S_pwm_Timer_GlobalData::message, messageQueue_init(), S_pwm_Timer_GlobalData::pActive, S_pwm_Timer_GlobalData::pRead, pwm_Channels_Brightness_Max, pwm_Timer_Cycles_Max, S_pwm_Timer_GlobalData::readDone, S_pwm_Timer_GlobalData::step, and S_pwm_Channels_Message::step.
Referenced by pwm_Channels_init().
SIGNAL | ( | SIG_OUTPUT_COMPARE1A | ) |
Timer interrupt routine.
Determines the pattern to set and handles the times to do PWM.
Definition at line 103 of file pwm_timer.c.
References S_pwm_Timer_GlobalData::currentCycle, S_pwm_Channels_Step::cycle, False, messageQueue_read(), S_pwm_Timer_GlobalData::pActive, S_pwm_Timer_GlobalData::pRead, pwm_Channels_StepCounter_Max, pwm_Timer_Cycles_Max, pwm_Timer_Cycles_ReadMin, S_pwm_Timer_GlobalData::readDone, S_pwm_Channels_Message::step, S_pwm_Timer_GlobalData::step, and True.