common/usbledfader.h File Reference

Global definitions and datatypes, used by the firmware and the commandline-client. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  S_fade_Waveform
 Description of one waveform. More...
struct  S_fade_LedState
 The state of one LED. More...
struct  S_fade_GlobalData
 Contains the state of all four LEDs. More...

Defines

#define msgOK   0
 Return code for OK.
#define msgErr   1
 Return code for Error.
#define CMD_ECHO   0
 Command to echo the sent data.
#define CMD_GET   1
 Command to fetch values.
#define CMD_SET   2
 Command to send values.
#define CMD_CLEAR   3
 Command to switch off a certain LED.
#define CMD_RESET   4
 Command to reset the whole device.

Typedefs

typedef S_fade_Waveform fade_Waveform
 Description of one waveform.
typedef S_fade_LedState fade_LedState
 The state of one LED.
typedef S_fade_GlobalData fade_GlobalData
 Contains the state of all four LEDs.

Functions

uint8_t fade_calculateWaveform (uint8_t waveformId, uint8_t waveformPosition)
 Calculate a waveform.


Detailed Description

Global definitions and datatypes, used by the firmware and the commandline-client.

Also contains the main doxygen-documentation.

Author:
Ronald Schaten & Thomas Stegemann
Version:
Id
usbledfader.h,v 1.4 2006/10/02 17:29:47 rschaten Exp
License: See documentation.

Definition in file usbledfader.h.


Define Documentation

#define CMD_CLEAR   3

Command to switch off a certain LED.

Definition at line 339 of file usbledfader.h.

Referenced by dev_clear(), and usbFunctionSetup().

#define CMD_ECHO   0

Command to echo the sent data.

Definition at line 336 of file usbledfader.h.

Referenced by dev_test(), and usbFunctionSetup().

#define CMD_GET   1

Command to fetch values.

Definition at line 337 of file usbledfader.h.

Referenced by dev_status(), and usbFunctionSetup().

#define CMD_RESET   4

Command to reset the whole device.

Definition at line 340 of file usbledfader.h.

Referenced by dev_reset(), and usbFunctionSetup().

#define CMD_SET   2

Command to send values.

Definition at line 338 of file usbledfader.h.

Referenced by dev_set(), and usbFunctionSetup().

#define msgErr   1

Return code for Error.

Definition at line 333 of file usbledfader.h.

Referenced by usbFunctionSetup().

#define msgOK   0

Return code for OK.

Definition at line 332 of file usbledfader.h.

Referenced by usbFunctionSetup().


Typedef Documentation

typedef struct S_fade_GlobalData fade_GlobalData

Contains the state of all four LEDs.

typedef struct S_fade_LedState fade_LedState

The state of one LED.

typedef struct S_fade_Waveform fade_Waveform

Description of one waveform.


Function Documentation

uint8_t fade_calculateWaveform ( uint8_t  waveformId,
uint8_t  waveformPosition 
)

Calculate a waveform.

Returns either the length of a given waveform or the output-level at a certain position in the wave.

Parameters:
waveformId ID of the waveform in question.
waveformPosition 0 or position in the given waveform.
Returns:
If the waveformPosition is 0, the number of steps in this waveform is returned. Otherwise the resulting output-level, an integer between 0 and 31.

Definition at line 375 of file usbledfader.h.

Referenced by dev_show(), fade_globalData_init(), and fade_startWaveform().


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