Fixed USART1
This commit is contained in:
parent
ef24096b04
commit
8e249b46b5
@ -379,8 +379,20 @@ ISR( USART0_UDRE_vect_D )
|
||||
USART0::inst().transmitInterruptHandler();
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef SECOND_USART
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
USART1 USART1::sm_cInstance;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
USART1& USART1::inst()
|
||||
{
|
||||
return sm_cInstance;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
USART1::USART1()
|
||||
{
|
||||
@ -392,4 +404,16 @@ USART1::USART1()
|
||||
m_vui8pUDR = &UDR1;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
ISR( USART1_RX_vect_D )
|
||||
{
|
||||
USART1::inst().receiveInterruptHandler();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
ISR( USART1_UDRE_vect_D )
|
||||
{
|
||||
USART1::inst().transmitInterruptHandler();
|
||||
}
|
||||
|
||||
#endif
|
@ -151,6 +151,13 @@ public:
|
||||
class USART1 : public USART0
|
||||
{
|
||||
public:
|
||||
static USART1& inst();
|
||||
USART1( const USART1& ) = delete;
|
||||
void operator=( const USART1& ) = delete;
|
||||
|
||||
private:
|
||||
static USART1 sm_cInstance;
|
||||
|
||||
USART1();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user