Subversion Repositories FlightCtrl

Rev

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

Rev 2039 Rev 2189
Line 9... Line 9...
9
/*              Initialization of the USART1                    */
9
/*              Initialization of the USART1                    */
10
/****************************************************************/
10
/****************************************************************/
11
void usart1_init(void) {
11
void usart1_init(void) {
12
        // USART1 Control and Status Register A, B, C and baud rate register
12
        // USART1 Control and Status Register A, B, C and baud rate register
13
        uint8_t sreg = SREG;
13
        uint8_t sreg = SREG;
14
        uint16_t ubrr = (uint16_t) ((uint32_t) F_CPU / (8 * USART1_BAUD) - 1);
14
        uint16_t ubrr = (uint16_t) (F_CPU / (8 * USART1_BAUD) - 1);
Line 15... Line 15...
15
 
15
 
16
        // disable all interrupts before reconfiguration
16
        // disable all interrupts before reconfiguration
Line 17... Line 17...
17
        cli();
17
        cli();