firmware/pwm_timer.c File Reference

Controls the actual PWM-output. More...

#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.


Detailed Description

Controls the actual PWM-output.

Author:
Thomas Stegemann
Version:
Id
pwm_timer.c,v 1.2 2006/09/29 22:30:03 rschaten Exp
License: See documentation.

Definition in file pwm_timer.c.


Typedef Documentation

typedef struct S_pwm_Timer_GlobalData pwm_Timer_GlobalData

Structure to contain the global data for the timer.


Function Documentation

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   ) 

Do nothing.

Definition at line 67 of file pwm_timer.c.

Referenced by pwm_Channels_show().

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.


Generated on Mon Oct 2 19:31:18 2006 for USB-LED-Fader by  doxygen 1.4.7