mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-03 12:07:52 +00:00
Update to last Pascal mod.
This commit is contained in:
parent
9df79e400f
commit
2c3b64cde8
@ -21,7 +21,7 @@
|
||||
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#define STM32_board
|
||||
#undef __cplusplus
|
||||
//#undef __cplusplus
|
||||
#if defined STM32_board
|
||||
#include "Multiprotocol_STM32.h"
|
||||
#include <EEPROM.h>
|
||||
@ -1392,7 +1392,6 @@ void loop()
|
||||
ISR(USARTC0_RXC_vect)
|
||||
#else
|
||||
#if defined STM32_board
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -1407,6 +1406,9 @@ void loop()
|
||||
#ifdef XMEGA
|
||||
if((USARTC0.STATUS & 0x1C)==0) // Check frame error, data overrun and parity error
|
||||
#else
|
||||
#ifndef STM32_board
|
||||
UCSR0B &= ~_BV(RXCIE0) ; // RX interrupt disable
|
||||
#endif
|
||||
sei();
|
||||
#if defined STM32_board
|
||||
if(USART2_BASE->SR & USART_SR_RXNE) {
|
||||
@ -1461,7 +1463,6 @@ void loop()
|
||||
|
||||
rx_buff[(idx++)-1]=USART2_BASE->DR&0xff; // Store received byte
|
||||
#else
|
||||
|
||||
rx_buff[(idx++)-1]=UDR0; // Store received byte
|
||||
#endif
|
||||
#endif
|
||||
@ -1475,7 +1476,7 @@ void loop()
|
||||
}
|
||||
else
|
||||
RX_MISSED_BUFF_on; // notify that rx_buff is good
|
||||
idx=0; // start again
|
||||
discard_frame=1; // start again
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1502,11 +1503,20 @@ void loop()
|
||||
detachInterrupt(2);//disable interrupt on ch2
|
||||
#else
|
||||
TIMSK1 &=~(1<<OCIE1B); // disable interrupt on compare B match
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef STM32_board
|
||||
#ifndef XMEGA
|
||||
TX_RX_PAUSE_off;
|
||||
tx_resume();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#ifndef STM32_board)
|
||||
cli() ;
|
||||
UCSR0B |= _BV(RXCIE0) ; // RX interrupt enable
|
||||
|
||||
#endif
|
||||
#if defined STM32_board //If activated telemetry it doesn't work activated
|
||||
}
|
||||
#endif
|
||||
@ -1539,6 +1549,9 @@ void loop()
|
||||
TIMSK1 &=~(1<<OCIE1B); // Disable interrupt on compare B match
|
||||
#endif
|
||||
#endif
|
||||
#ifndef STM32_board
|
||||
tx_resume();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user