2007-09-20 22:54:11 +02:00
|
|
|
#ifndef _MAIN_H_
|
|
|
|
#define _MAIN_H_
|
|
|
|
|
|
|
|
#include <avr/io.h>
|
|
|
|
|
|
|
|
#define F_CPU 8000000
|
|
|
|
#include <util/delay.h>
|
|
|
|
|
|
|
|
#define LED_RT (1<<PORTB4)
|
|
|
|
#define LED_GN (1<<PORTB5)
|
|
|
|
|
2008-06-21 14:34:57 +02:00
|
|
|
#define PHASE_A_EN (1<<PORTB2)
|
|
|
|
#define PHASE_A_PWM (1<<PORTB3)
|
|
|
|
#define PHASE_A_OC (1<<COM2A1)
|
|
|
|
|
|
|
|
#define PHASE_B_EN (1<<PORTD7)
|
|
|
|
#define PHASE_B_PWM (1<<PORTD5)
|
|
|
|
#define PHASE_B_OC (1<<COM0B1)
|
|
|
|
|
|
|
|
#define PHASE_C_EN (1<<PORTD4)
|
|
|
|
#define PHASE_C_PWM (1<<PORTD3)
|
|
|
|
#define PHASE_C_OC (1<<COM2B1)
|
|
|
|
|
|
|
|
#define SENSE_A 0
|
|
|
|
#define SENSE_B 2
|
|
|
|
#define SENSE_C 1
|
|
|
|
|
|
|
|
#define SENSE_VOLTAGE 7
|
|
|
|
#define SENSE_CURRENT 3
|
|
|
|
|
2007-09-20 22:54:11 +02:00
|
|
|
#endif
|