config.h File Reference

This file contains the function declarations. More...

#include "compiler.h"
#include "config_motor.h"

Include dependency graph for config.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define A_RA_VAL   1
 POCR0RA = 1 to synchronize the ADC at the center of the waveform.
#define A_SA_VAL   0
 POCR0SA = 0 for no pulse at init.
#define A_SB_VAL   0
 POCR0SB = 0 for no pulse at init.
#define ADC_ADLAR_VALUE   ADC_RIGHT_ADJUST_RESULT
#define ADC_AREF_PIN_ENABLE_VALUE   ADC_AREF_PIN_DISABLE
#define ADC_AUTO_TRIG_ENABLE_VALUE   ADC_AUTO_TRIG_DISABLE
#define ADC_AUTO_TRIG_SOURCE   ADC_FREE_RUNNING
#define ADC_CHANNEL   ADC_INPUT_ADC0
#define ADC_CURRENT_SOURCE_ENABLE_VALUE   ADC_CURRENT_SRC_ENABLE
#define ADC_ENABLE_BIT_VALUE   ADC_ENABLE
#define ADC_HIGH_SPEED_MODE_VALUE   ADC_HIGH_SPEED_MODE
#define ADC_INTERRUPT_ENABLE_VALUE   ADC_INTERRUPT_ENABLE
#define ADC_PRESCALER_SELECT_VALUE   ADC_DIV_CLOCK_BY_4
#define ADC_REF_SOURCE   ADC_REF_EQ_INT_VREF
#define AMP1_CLOCK_SOURCE   AMP_CLOCK_EQ_PSC0
#define AMP1_CMP1_CONNECTION_VALUE   AMP_CMP_DISCONNECTED
#define AMP1_ENABLE_VALUE   AMP_ENABLE
#define AMP1_GAIN   AMP_GAIN_5
#define AMP1_INPUT_SHUNT_VALUE   AMP_SHUNT_DISABLE
#define B_RA_VAL   1
#define B_SA_VAL   0
 POCR1SA = 0 for no pulse at init.
#define B_SB_VAL   0
 POCR1SB = 0 for no pulse at init.
#define BAUDRATE   38400
#define BOARD_ID   3
#define C_RA_VAL   1
#define C_SA_VAL   0
 POCR2SA = 0 for no pulse at init.
#define C_SB_VAL   0
 POCR2SB = 0 for no pulse at init.
#define Clear_PC3()   (PORTC &= ~(1<<PORTC3))
#define Clear_PC7()   (PORTC &= ~(1<<PORTC7))
#define Clear_PE1()   (PORTE &= ~(1<<PORTE1))
#define Clear_PE2()   (PORTE &= ~(1<<PORTE2))
#define COMP0_ENABLE_BIT_VALUE   COMP_ENABLE
#define COMP0_INTERRUPT_ENABLE   COMP_ENABLE_INTERRUPT
#define COMP0_INTERRUPT_SELECT   COMP_INTERRUPT_ON_OUTPUT_TOGGLE
#define COMP0_NEG_INPUT_SELECT   COMP_USE_NEGATIVE_PIN
#define COMP1_CAPTURE_ENABLE   COMP_CAPTURE_DISABLE
#define COMP1_ENABLE_BIT_VALUE   COMP_ENABLE
#define COMP1_INTERRUPT_ENABLE   COMP_ENABLE_INTERRUPT
#define COMP1_INTERRUPT_SELECT   COMP_INTERRUPT_ON_OUTPUT_TOGGLE
#define COMP1_NEG_INPUT_SELECT   COMP_USE_NEGATIVE_PIN
#define COMP2_ENABLE_BIT_VALUE   COMP_ENABLE
#define COMP2_INTERRUPT_ENABLE   COMP_ENABLE_INTERRUPT
#define COMP2_INTERRUPT_SELECT   COMP_INTERRUPT_ON_OUTPUT_TOGGLE
#define COMP2_NEG_INPUT_SELECT   COMP_USE_NEGATIVE_PIN
#define COMP_CLOCK_SOURCE   COMP_CLOCK_IO
#define CURRENT_DECAY   FAST_DECAY
 Select here the current decay type for the application.
#define DAC_AUTOTRIG_ENABLE_VALUE   DAC_AUTOTRIG_DISABLE
#define DAC_ENABLE_VALUE   DAC_ENABLE
#define DAC_LEFT_ADJUST_VALUE   DAC_LEFT_ADJUST
#define DAC_OUTPUT_ENABLE_VALUE   DAC_OUTPUT_DISABLE
#define DAC_TRIGGER_SELECTION   DAC_TRIG_WITH_COMP0
#define DEADTIME   2
 Dead Time for the inverter.
#define FAST_DECAY   1
#define FAST_DECAY_SYNCHRONOUS   3
#define FOSC   16000
#define High(data_w)   ((U8)(data_w>>8))
#define Init_PC3()   (DDRC |= (1<<DDC3))
#define Init_PC7()   (DDRC |= (1<<DDC7))
#define Low(data_w)   ((U8)data_w)
#define PSC_CLOCK_SOURCE   PSC_CLOCK_SOURCE_EQ_PLL
#define PSC_MODE   PSC_MODE_CENTERED
#define PSC_OUTPUT_A_POLARITY   PSC_OUTPUT_HIGH
#define PSC_OUTPUT_B_POLARITY   PSC_OUTPUT_LOW
#define PSC_PRESCALER   PSC_NODIV_CLOCK
#define RB_VAL   255
 POCR_RB = 255 => PWM freq = PLL freq / 255.
#define REV_ID   1
#define Set_PC3()   (PORTC |= (1<<PORTC3))
#define Set_PC7()   (PORTC |= (1<<PORTC7))
#define Set_PE1()   (PORTE |= (1<<PORTE1))
#define Set_PE2()   (PORTE |= (1<<PORTE2))
#define SLOW_DECAY   0
 Define all current decay types.
#define SLOW_DECAY_SYNCHRONOUS   2
#define SOFT_ID   3
#define Toggle_PC3()   (PINC |= (1<<PINC3))
#define Toggle_PC7()   (PINC |= (1<<PINC7))
#define Toggle_PE1()   (PINE |= (1<<PINE1))
#define Toggle_PE2()   (PINE |= (1<<PINE2))
#define USE_INTERNAL_COMPARATORS


Detailed Description

This file contains the function declarations.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file config.h.


Define Documentation

#define A_RA_VAL   1

POCR0RA = 1 to synchronize the ADC at the center of the waveform.

Definition at line 155 of file config.h.

Referenced by mc_duty_cycle(), and PSC_Init().

#define A_SA_VAL   0

POCR0SA = 0 for no pulse at init.

Definition at line 154 of file config.h.

Referenced by PSC_Init().

#define A_SB_VAL   0

POCR0SB = 0 for no pulse at init.

Definition at line 156 of file config.h.

Referenced by PSC_Init().

#define ADC_ADLAR_VALUE   ADC_RIGHT_ADJUST_RESULT

Definition at line 82 of file config.h.

#define ADC_AREF_PIN_ENABLE_VALUE   ADC_AREF_PIN_DISABLE

Definition at line 90 of file config.h.

#define ADC_AUTO_TRIG_ENABLE_VALUE   ADC_AUTO_TRIG_DISABLE

Definition at line 85 of file config.h.

#define ADC_AUTO_TRIG_SOURCE   ADC_FREE_RUNNING

Definition at line 91 of file config.h.

#define ADC_CHANNEL   ADC_INPUT_ADC0

Definition at line 83 of file config.h.

#define ADC_CURRENT_SOURCE_ENABLE_VALUE   ADC_CURRENT_SRC_ENABLE

Definition at line 89 of file config.h.

#define ADC_ENABLE_BIT_VALUE   ADC_ENABLE

Definition at line 84 of file config.h.

#define ADC_HIGH_SPEED_MODE_VALUE   ADC_HIGH_SPEED_MODE

Definition at line 88 of file config.h.

#define ADC_INTERRUPT_ENABLE_VALUE   ADC_INTERRUPT_ENABLE

Definition at line 86 of file config.h.

#define ADC_PRESCALER_SELECT_VALUE   ADC_DIV_CLOCK_BY_4

Definition at line 87 of file config.h.

#define ADC_REF_SOURCE   ADC_REF_EQ_INT_VREF

Definition at line 81 of file config.h.

#define AMP1_CLOCK_SOURCE   AMP_CLOCK_EQ_PSC0

Definition at line 77 of file config.h.

#define AMP1_CMP1_CONNECTION_VALUE   AMP_CMP_DISCONNECTED

Definition at line 76 of file config.h.

#define AMP1_ENABLE_VALUE   AMP_ENABLE

Definition at line 73 of file config.h.

#define AMP1_GAIN   AMP_GAIN_5

Definition at line 75 of file config.h.

#define AMP1_INPUT_SHUNT_VALUE   AMP_SHUNT_DISABLE

Definition at line 74 of file config.h.

#define B_RA_VAL   1

Definition at line 159 of file config.h.

Referenced by mc_duty_cycle(), and PSC_Init().

#define B_SA_VAL   0

POCR1SA = 0 for no pulse at init.

Definition at line 158 of file config.h.

Referenced by PSC_Init().

#define B_SB_VAL   0

POCR1SB = 0 for no pulse at init.

Definition at line 160 of file config.h.

Referenced by PSC_Init().

#define BAUDRATE   38400

Definition at line 60 of file config.h.

Referenced by uart_init().

#define BOARD_ID   3

Definition at line 54 of file config.h.

Referenced by ushell_task().

#define C_RA_VAL   1

Definition at line 163 of file config.h.

Referenced by mc_duty_cycle(), and PSC_Init().

#define C_SA_VAL   0

POCR2SA = 0 for no pulse at init.

Definition at line 162 of file config.h.

Referenced by PSC_Init().

#define C_SB_VAL   0

POCR2SB = 0 for no pulse at init.

Definition at line 164 of file config.h.

Referenced by PSC_Init().

 
#define Clear_PC3 (  )     (PORTC &= ~(1<<PORTC3))

Definition at line 177 of file config.h.

 
#define Clear_PC7 (  )     (PORTC &= ~(1<<PORTC7))

Definition at line 182 of file config.h.

Referenced by main().

 
#define Clear_PE1 (  )     (PORTE &= ~(1<<PORTE1))

Definition at line 186 of file config.h.

 
#define Clear_PE2 (  )     (PORTE &= ~(1<<PORTE2))

Definition at line 190 of file config.h.

#define COMP0_ENABLE_BIT_VALUE   COMP_ENABLE

Definition at line 97 of file config.h.

#define COMP0_INTERRUPT_ENABLE   COMP_ENABLE_INTERRUPT

Definition at line 98 of file config.h.

#define COMP0_INTERRUPT_SELECT   COMP_INTERRUPT_ON_OUTPUT_TOGGLE

Definition at line 99 of file config.h.

#define COMP0_NEG_INPUT_SELECT   COMP_USE_NEGATIVE_PIN

Definition at line 102 of file config.h.

#define COMP1_CAPTURE_ENABLE   COMP_CAPTURE_DISABLE

Definition at line 111 of file config.h.

#define COMP1_ENABLE_BIT_VALUE   COMP_ENABLE

Definition at line 108 of file config.h.

#define COMP1_INTERRUPT_ENABLE   COMP_ENABLE_INTERRUPT

Definition at line 109 of file config.h.

#define COMP1_INTERRUPT_SELECT   COMP_INTERRUPT_ON_OUTPUT_TOGGLE

Definition at line 110 of file config.h.

#define COMP1_NEG_INPUT_SELECT   COMP_USE_NEGATIVE_PIN

Definition at line 113 of file config.h.

#define COMP2_ENABLE_BIT_VALUE   COMP_ENABLE

Definition at line 119 of file config.h.

#define COMP2_INTERRUPT_ENABLE   COMP_ENABLE_INTERRUPT

Definition at line 120 of file config.h.

#define COMP2_INTERRUPT_SELECT   COMP_INTERRUPT_ON_OUTPUT_TOGGLE

Definition at line 121 of file config.h.

#define COMP2_NEG_INPUT_SELECT   COMP_USE_NEGATIVE_PIN

Definition at line 123 of file config.h.

#define COMP_CLOCK_SOURCE   COMP_CLOCK_IO

Definition at line 100 of file config.h.

#define CURRENT_DECAY   FAST_DECAY

Select here the current decay type for the application.

Definition at line 144 of file config.h.

#define DAC_AUTOTRIG_ENABLE_VALUE   DAC_AUTOTRIG_DISABLE

Definition at line 65 of file config.h.

#define DAC_ENABLE_VALUE   DAC_ENABLE

Definition at line 69 of file config.h.

#define DAC_LEFT_ADJUST_VALUE   DAC_LEFT_ADJUST

Definition at line 67 of file config.h.

#define DAC_OUTPUT_ENABLE_VALUE   DAC_OUTPUT_DISABLE

Definition at line 68 of file config.h.

#define DAC_TRIGGER_SELECTION   DAC_TRIG_WITH_COMP0

Definition at line 66 of file config.h.

#define DEADTIME   2

Dead Time for the inverter.

Definition at line 168 of file config.h.

Referenced by mc_duty_cycle().

#define FAST_DECAY   1

Definition at line 138 of file config.h.

#define FAST_DECAY_SYNCHRONOUS   3

Definition at line 140 of file config.h.

#define FOSC   16000

Definition at line 61 of file config.h.

#define High ( data_w   )     ((U8)(data_w>>8))

Definition at line 171 of file config.h.

 
#define Init_PC3 (  )     (DDRC |= (1<<DDC3))

Definition at line 174 of file config.h.

 
#define Init_PC7 (  )     (DDRC |= (1<<DDC7))

Definition at line 179 of file config.h.

Referenced by mc_init_HW().

#define Low ( data_w   )     ((U8)data_w)

Definition at line 170 of file config.h.

#define PSC_CLOCK_SOURCE   PSC_CLOCK_SOURCE_EQ_PLL

Definition at line 130 of file config.h.

#define PSC_MODE   PSC_MODE_CENTERED

Definition at line 132 of file config.h.

#define PSC_OUTPUT_A_POLARITY   PSC_OUTPUT_HIGH

Definition at line 134 of file config.h.

#define PSC_OUTPUT_B_POLARITY   PSC_OUTPUT_LOW

Definition at line 149 of file config.h.

#define PSC_PRESCALER   PSC_NODIV_CLOCK

Definition at line 129 of file config.h.

#define RB_VAL   255

POCR_RB = 255 => PWM freq = PLL freq / 255.

Definition at line 166 of file config.h.

Referenced by PSC_Init().

#define REV_ID   1

Definition at line 56 of file config.h.

Referenced by ushell_task().

 
#define Set_PC3 (  )     (PORTC |= (1<<PORTC3))

Definition at line 176 of file config.h.

 
#define Set_PC7 (  )     (PORTC |= (1<<PORTC7))

Definition at line 181 of file config.h.

Referenced by main().

 
#define Set_PE1 (  )     (PORTE |= (1<<PORTE1))

Definition at line 185 of file config.h.

 
#define Set_PE2 (  )     (PORTE |= (1<<PORTE2))

Definition at line 189 of file config.h.

#define SLOW_DECAY   0

Define all current decay types.

Definition at line 137 of file config.h.

#define SLOW_DECAY_SYNCHRONOUS   2

Definition at line 139 of file config.h.

#define SOFT_ID   3

Definition at line 55 of file config.h.

Referenced by ushell_task().

 
#define Toggle_PC3 (  )     (PINC |= (1<<PINC3))

Definition at line 175 of file config.h.

 
#define Toggle_PC7 (  )     (PINC |= (1<<PINC7))

Definition at line 180 of file config.h.

 
#define Toggle_PE1 (  )     (PINE |= (1<<PINE1))

Definition at line 184 of file config.h.

 
#define Toggle_PE2 (  )     (PINE |= (1<<PINE2))

Definition at line 188 of file config.h.

#define USE_INTERNAL_COMPARATORS

Definition at line 94 of file config.h.


Generated on Wed Oct 22 15:03:59 2008 for AVR172 : Atmel BLDC control on ATAVRMC310 with ATmega32M1 by  doxygen 1.5.7.1