aversive_10-03-12/modules/hardware/pwm/pwm.h File Reference

Interface for the PWM module. More...

#include <aversive.h>
#include <aversive/timers.h>
#include <aversive/parts.h>
#include <pwm_config.h>

Go to the source code of this file.

Defines

#define PWM_NORMAL   0x00
#define PWM_REVERSE   0x01
#define PWM_SIGN_INVERTED   0x02
#define PWM_SIGNED   0x04
#define PWM_SPECIAL_SIGN_MODE   0x08
#define PWM_MAX   ((1<< PWM_SIGNIFICANT_BITS)-1)
#define PWM_MIN   (-PWM_MAX)

Functions

void pwm_init (void)
void pwm_set (void *data, int32_t value)


Detailed Description

Interface for the PWM module.

Todo:
Test the module.
Test:
No tests for the moment.
This module provides functions for using a pwm

Definition in file pwm.h.


Define Documentation

#define PWM_MAX   ((1<< PWM_SIGNIFICANT_BITS)-1)

value to be used for limiting inputs

Definition at line 54 of file pwm.h.

Referenced by pwm_ng_set(), and SIGNAL().

#define PWM_MIN   (-PWM_MAX)

Definition at line 55 of file pwm.h.

Referenced by pwm_ng_set().

#define PWM_NORMAL   0x00

PWM signs & sign ligne inversion

Definition at line 47 of file pwm.h.

#define PWM_REVERSE   0x01

Definition at line 48 of file pwm.h.

#define PWM_SIGN_INVERTED   0x02

Definition at line 49 of file pwm.h.

#define PWM_SIGNED   0x04

Definition at line 50 of file pwm.h.

#define PWM_SPECIAL_SIGN_MODE   0x08

Definition at line 51 of file pwm.h.


Function Documentation

void pwm_init ( void   ) 

global functions

Definition at line 560 of file pwm.c.

Referenced by brushless_init().

void pwm_set ( void *  data,
int32_t  value 
)

apply a PWM.

Parameters:
data is a pointer that is casted in (uint8_t) to specify the number of the PWM.
value is the value of the pwm.

Definition at line 605 of file pwm.c.

References PWM0_NUM, PWM1A_NUM, PWM1B_NUM, PWM1C_NUM, PWM2_NUM, PWM3A_NUM, PWM3B_NUM, PWM3C_NUM, and S_MAX.


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6