Subversion Repositories HomeAutomation

Rev

Rev 1578 | Rev 1738 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1578 Rev 1695
Line 129... Line 129...
129
 #define UART0_CONTROL  UCSRB
129
 #define UART0_CONTROL  UCSRB
130
 #define UART0_DATA     UDR
130
 #define UART0_DATA     UDR
131
 #define UART0_UDRIE    UDRIE
131
 #define UART0_UDRIE    UDRIE
132
#elif defined(__AVR_ATmega48__) ||defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__)
132
#elif defined(__AVR_ATmega48__) ||defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__)
133
 #define ATMEGA_USART0
133
 #define ATMEGA_USART0
134
 #define UART0_RECEIVE_INTERRUPT   SIG_USART_RECV
134
 #define UART0_RECEIVE_INTERRUPT   USART_RX_vect
135
 #define UART0_TRANSMIT_INTERRUPT  SIG_USART_DATA
135
 #define UART0_TRANSMIT_INTERRUPT  USART_UDRE_vect
136
 #define UART0_STATUS   UCSR0A
136
 #define UART0_STATUS   UCSR0A
137
 #define UART0_CONTROL  UCSR0B
137
 #define UART0_CONTROL  UCSR0B
138
 #define UART0_DATA     UDR0
138
 #define UART0_DATA     UDR0
139
 #define UART0_UDRIE    UDRIE0
139
 #define UART0_UDRIE    UDRIE0
140
#elif defined(__AVR_ATtiny2313__)
140
#elif defined(__AVR_ATtiny2313__)
Line 222... Line 222...
222
    }
222
    }
223
    uart_updateConfig();
223
    uart_updateConfig();
224
}
224
}
225
 
225
 
226
 
226
 
227
SIGNAL(UART0_RECEIVE_INTERRUPT)
227
ISR(UART0_RECEIVE_INTERRUPT)
228
/*************************************************************************
228
/*************************************************************************
229
Function: UART Receive Complete interrupt
229
Function: UART Receive Complete interrupt
230
Purpose:  called when the UART has received a character
230
Purpose:  called when the UART has received a character
231
**************************************************************************/
231
**************************************************************************/
232
{
232
{
Line 265... Line 265...
265
    }
265
    }
266
    UART_LastRxError = lastRxError;  
266
    UART_LastRxError = lastRxError;  
267
}
267
}
268
 
268
 
269
 
269
 
270
SIGNAL(UART0_TRANSMIT_INTERRUPT)
270
ISR(UART0_TRANSMIT_INTERRUPT)
271
/*************************************************************************
271
/*************************************************************************
272
Function: UART Data Register Empty interrupt
272
Function: UART Data Register Empty interrupt
273
Purpose:  called when the UART is ready to transmit the next byte
273
Purpose:  called when the UART is ready to transmit the next byte
274
**************************************************************************/
274
**************************************************************************/
275
{
275
{
Line 450... Line 450...
450
/*
450
/*
451
 * these functions are only for ATmegas with two USART
451
 * these functions are only for ATmegas with two USART
452
 */
452
 */
453
#if defined( ATMEGA_USART1 )
453
#if defined( ATMEGA_USART1 )
454
 
454
 
455
SIGNAL(UART1_RECEIVE_INTERRUPT)
455
ISR(UART1_RECEIVE_INTERRUPT)
456
/*************************************************************************
456
/*************************************************************************
457
Function: UART1 Receive Complete interrupt
457
Function: UART1 Receive Complete interrupt
458
Purpose:  called when the UART1 has received a character
458
Purpose:  called when the UART1 has received a character
459
**************************************************************************/
459
**************************************************************************/
460
{
460
{
Line 485... Line 485...
485
    }
485
    }
486
    UART1_LastRxError = lastRxError;  
486
    UART1_LastRxError = lastRxError;  
487
}
487
}
488
 
488
 
489
 
489
 
490
SIGNAL(UART1_TRANSMIT_INTERRUPT)
490
ISR(UART1_TRANSMIT_INTERRUPT)
491
/*************************************************************************
491
/*************************************************************************
492
Function: UART1 Data Register Empty interrupt
492
Function: UART1 Data Register Empty interrupt
493
Purpose:  called when the UART1 is ready to transmit the next byte
493
Purpose:  called when the UART1 is ready to transmit the next byte
494
**************************************************************************/
494
**************************************************************************/
495
{
495
{