mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-01 18:27:53 +00:00
.
This commit is contained in:
parent
061c97caca
commit
e63f71d3a7
@ -1050,12 +1050,11 @@ ISR(USART_RX_vect)
|
|||||||
if(idx==0)
|
if(idx==0)
|
||||||
{ // Let's try to sync at this point
|
{ // Let's try to sync at this point
|
||||||
#ifdef XMEGA
|
#ifdef XMEGA
|
||||||
if(USARTC0.DATA==0x55) // If 1st byte is 0x55 it looks ok
|
if(USARTC0.DATA==0x55) // If 1st byte is 0x55 it looks ok
|
||||||
#else
|
#else
|
||||||
if(UDR0==0x55) // If 1st byte is 0x55 it looks ok
|
if(UDR0==0x55) // If 1st byte is 0x55 it looks ok
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
idx++;
|
|
||||||
#ifdef XMEGA
|
#ifdef XMEGA
|
||||||
TCC1.CCB = TCC1.CNT+(6500L) ; // Full message should be received within timer of 3250us
|
TCC1.CCB = TCC1.CNT+(6500L) ; // Full message should be received within timer of 3250us
|
||||||
TCC1.INTFLAGS = TC1_CCBIF_bm ; // clear OCR1B match flag
|
TCC1.INTFLAGS = TC1_CCBIF_bm ; // clear OCR1B match flag
|
||||||
@ -1065,6 +1064,7 @@ ISR(USART_RX_vect)
|
|||||||
TIFR1=(1<<OCF1B); // clear OCR1B match flag
|
TIFR1=(1<<OCF1B); // clear OCR1B match flag
|
||||||
TIMSK1 |=(1<<OCIE1B); // enable interrupt on compare B match
|
TIMSK1 |=(1<<OCIE1B); // enable interrupt on compare B match
|
||||||
#endif
|
#endif
|
||||||
|
idx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user