Subversion Repositories FlightCtrl

Rev

Rev 757 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 757 Rev 762
Line 59... Line 59...
59
#include "timer2.h"
59
#include "timer2.h"
60
#include "uart.h"
60
#include "uart.h"
61
#if defined (__AVR_ATmega644P__)
61
#if defined (__AVR_ATmega644P__)
62
#include "uart1.h"
62
#include "uart1.h"
63
#endif
63
#endif
-
 
64
#include "led.h"
64
#include "menu.h"
65
#include "menu.h"
65
#include "ubx.h"
66
#include "ubx.h"
66
#include "fc.h"
67
#include "fc.h"
67
#include "rc.h"
68
#include "rc.h"
68
#include "analog.h"
69
#include "analog.h"
Line 103... Line 104...
103
        // set LED ports as output
104
        // set LED ports as output
104
        DDRB |= (1<<DDB1)|(1<<DDB0);
105
        DDRB |= (1<<DDB1)|(1<<DDB0);
105
        ROT_ON;
106
        ROT_ON;
106
        GRN_OFF;
107
        GRN_OFF;
Line 107... Line -...
107
 
-
 
108
        // set PC2 & PC3 as output (ctrl J16 & J17)
-
 
109
        DDRC |= (1<<DDC2)|(1<<DDC3);
-
 
110
        J16_OFF;
-
 
111
        J17_OFF;
-
 
112
 
108
 
113
    // disable watchdog
109
        // disable watchdog
114
    MCUSR &=~(1<<WDRF);
110
    MCUSR &=~(1<<WDRF);
115
    WDTCSR |= (1<<WDCE)|(1<<WDE);
111
    WDTCSR |= (1<<WDCE)|(1<<WDE);
Line 116... Line 112...
116
    WDTCSR = 0;
112
    WDTCSR = 0;
Line 123... Line 119...
123
        StickPitch = 0;
119
        StickPitch = 0;
Line 124... Line 120...
124
 
120
 
Line 125... Line 121...
125
    ROT_OFF;
121
    ROT_OFF;
-
 
122
 
126
 
123
        // initalize modules
127
        // initalize modules
124
        LED_Init();
128
    TIMER0_Init();
125
    TIMER0_Init();
Line 129... Line 126...
129
    TIMER2_Init();
126
    TIMER2_Init();