1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Applied to UsartClass the same fix adopted for UartClass

This commit is contained in:
Cristian Maglie
2011-12-01 15:50:37 +01:00
parent 037ecd3e3e
commit 906bb28f9e
3 changed files with 53 additions and 66 deletions

View File

@ -279,40 +279,29 @@ void UART_IrqHandler(void)
* USART objects
*/
RingBuffer rx_buffer2 ;
RingBuffer tx_buffer2 ;
RingBuffer rx_buffer3 ;
RingBuffer tx_buffer3 ;
RingBuffer rx_buffer4 ;
RingBuffer tx_buffer4 ;
USARTClass Serial2( USART0, USART0_IRQn, ID_USART0, &rx_buffer2, &tx_buffer2 ) ;
USARTClass Serial3( USART1, USART1_IRQn, ID_USART1, &rx_buffer3, &tx_buffer3 ) ;
USARTClass Serial4( USART2, USART2_IRQn, ID_USART2, &rx_buffer4, &tx_buffer4 ) ;
#ifdef __cplusplus
extern "C" {
#endif
USARTClass Serial2( USART0, USART0_IRQn, ID_USART0, &rx_buffer2 ) ;
USARTClass Serial3( USART1, USART1_IRQn, ID_USART1, &rx_buffer3 ) ;
USARTClass Serial4( USART2, USART2_IRQn, ID_USART2, &rx_buffer4 ) ;
// IT handlers
extern void USART0_IrqHandler( void )
void USART0_IrqHandler( void )
{
Serial2.IrqHandler() ;
}
extern void USART1_IrqHandler( void )
void USART1_IrqHandler( void )
{
Serial3.IrqHandler() ;
}
extern void USART2_IrqHandler( void )
void USART2_IrqHandler( void )
{
Serial4.IrqHandler() ;
}
#ifdef __cplusplus
}
#endif
// ----------------------------------------------------------------------------
#ifdef __cplusplus