mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-03 12:07:52 +00:00
Fix avr compilation and invert serial tx
This commit is contained in:
parent
892b677194
commit
37b92e71db
@ -569,6 +569,7 @@ inline void tx_resume()
|
|||||||
{
|
{
|
||||||
#ifdef TELEMETRY
|
#ifdef TELEMETRY
|
||||||
if(!IS_TX_PAUSE_on)
|
if(!IS_TX_PAUSE_on)
|
||||||
|
{
|
||||||
#ifdef XMEGA
|
#ifdef XMEGA
|
||||||
USARTC0.CTRLA = (USARTC0.CTRLA & 0xFC) | 0x01 ; // Resume telemetry by enabling transmitter interrupt
|
USARTC0.CTRLA = (USARTC0.CTRLA & 0xFC) | 0x01 ; // Resume telemetry by enabling transmitter interrupt
|
||||||
#else
|
#else
|
||||||
@ -578,6 +579,7 @@ inline void tx_resume()
|
|||||||
UCSR0B |= _BV(UDRIE0); // Resume telemetry by enabling transmitter interrupt
|
UCSR0B |= _BV(UDRIE0); // Resume telemetry by enabling transmitter interrupt
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -595,7 +597,7 @@ void start_timer2(){
|
|||||||
timer.resume();
|
timer.resume();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
// Protocol scheduler
|
// Protocol scheduler
|
||||||
static void CheckTimer(uint16_t (*cb)(void))
|
static void CheckTimer(uint16_t (*cb)(void))
|
||||||
{
|
{
|
||||||
@ -691,7 +693,7 @@ static void CheckTimer(uint16_t (*cb)(void))
|
|||||||
while(diff&0x8000); // Callback did not took more than requested time for next callback
|
while(diff&0x8000); // Callback did not took more than requested time for next callback
|
||||||
// so we can let main do its stuff before next callback
|
// so we can let main do its stuff before next callback
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// Protocol start
|
// Protocol start
|
||||||
static void protocol_init()
|
static void protocol_init()
|
||||||
{
|
{
|
||||||
@ -706,9 +708,11 @@ static void protocol_init()
|
|||||||
#endif
|
#endif
|
||||||
pass=0;
|
pass=0;
|
||||||
telemetry_link=0;
|
telemetry_link=0;
|
||||||
|
#ifndef BASH_SERIAL
|
||||||
tx_tail=0;
|
tx_tail=0;
|
||||||
tx_head=0;
|
tx_head=0;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
blink=millis();
|
blink=millis();
|
||||||
if(IS_BIND_BUTTON_FLAG_on)
|
if(IS_BIND_BUTTON_FLAG_on)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user