58,7 → 58,9 |
#include "timer0.h" |
#include "timer2.h" |
#include "uart.h" |
#if defined (__AVR_ATmega644P__) |
#include "uart1.h" |
#endif |
#include "menu.h" |
#include "ubx.h" |
#include "fc.h" |
95,7 → 97,7 |
DDRB = 0x00; |
PORTB = 0x00; |
for(timer = 0; timer < 1000; timer++); // make some delay |
if(PINB & (1<<PINB1)) BoardRelease = 11; |
if(PINB & (1<<PINB0)) BoardRelease = 11; |
else BoardRelease = 10; |
|
// set LED ports as output |
127,7 → 129,7 |
TIMER2_Init(); |
USART0_Init(); |
|
#if defined (__AVR_ATmega644p__) |
#if defined (__AVR_ATmega644P__) |
if (BoardRelease == 11) USART1_Init(); |
#endif |
|
213,10 → 215,9 |
{ |
//SPI_TransmitByte(); //# |
UpdateMotor=0; // reset Flag, is enabled every 2 ms by isr of timer0 |
//PORTD |= 0x08; |
PORTD |= (1<<PORTD4); |
MotorControl(); |
|
//PORTD &= ~0x08; |
PORTD &= ~(1<<PORTD4); |
SendMotorData(); |
ROT_OFF; |
if(PcAccess) PcAccess--; |