Subversion Repositories FlightCtrl

Rev

Rev 1612 | Rev 1821 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1612 Rev 1645
Line 68... Line 68...
68
#endif
68
#endif
Line 69... Line 69...
69
 
69
 
70
/****************************************************************/
70
/****************************************************************/
71
/*              Initialization of the USART1                    */
71
/*              Initialization of the USART1                    */
72
/****************************************************************/
72
/****************************************************************/
73
void USART1_Init (void) {
73
void usart1_Init (void) {
74
        // USART1 Control and Status Register A, B, C and baud rate register
74
        // USART1 Control and Status Register A, B, C and baud rate register
75
        uint8_t sreg = SREG;
75
        uint8_t sreg = SREG;
Line 76... Line 76...
76
        uint16_t ubrr = (uint16_t) ((uint32_t) SYSCLK/(8 * USART1_BAUD) - 1);
76
        uint16_t ubrr = (uint16_t) ((uint32_t) SYSCLK/(8 * USART1_BAUD) - 1);
Line 132... Line 132...
132
}
132
}
Line 133... Line 133...
133
 
133
 
134
/****************************************************************/
134
/****************************************************************/
135
/*               USART1 data register empty ISR                 */
135
/*               USART1 data register empty ISR                 */
136
/****************************************************************/
136
/****************************************************************/
137
/*ISR(USART1_UDRE_vect)
-
 
138
{
-
 
139
 
137
/*ISR(USART1_UDRE_vect) {
140
}
138
}
Line 141... Line 139...
141
*/
139
*/
142
 
140
 
143
/****************************************************************/
141
/****************************************************************/
144
/*               USART1 transmitter ISR                         */
142
/*               USART1 transmitter ISR                         */
145
/****************************************************************/
-
 
146
/*ISR(USART1_TX_vect)
-
 
147
{
143
/****************************************************************/
148
 
144
/*ISR(USART1_TX_vect) {
149
}
145
}
150
*/
146
*/
151
/****************************************************************/
147
/****************************************************************/
152
/*               USART1 receiver ISR                            */
148
/*               USART1 receiver ISR                            */
153
/****************************************************************/
-
 
154
ISR(USART1_RX_vect)
149
/****************************************************************/
155
{
150
ISR(USART1_RX_vect) {
156
        uint8_t c;
151
        uint8_t c;
157
        c = UDR1; // get data byte
152
        c = UDR1; // get data byte
158
        #if defined (USE_MK3MAG)
153
        #if defined (USE_MK3MAG)