mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-11 00:08:14 +00:00
Multi_sync updates
Only for STM32 Enable bidirectionnal serial
This commit is contained in:
parent
cd7ede006c
commit
d434e63c22
@ -2027,13 +2027,13 @@ static uint32_t random_id(uint16_t address, uint8_t create_new)
|
|||||||
if((rx_buff[0]&0xFE)==0x54) // If 1st byte is 0x54 or 0x55 it looks ok
|
if((rx_buff[0]&0xFE)==0x54) // If 1st byte is 0x54 or 0x55 it looks ok
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
TX_RX_PAUSE_on;
|
|
||||||
tx_pause();
|
|
||||||
#if defined STM32_BOARD
|
#if defined STM32_BOARD
|
||||||
TIMER2_BASE->CCR2=TIMER2_BASE->CNT + 300; // Next byte should show up within 15us=1.5 byte
|
TIMER2_BASE->CCR2=TIMER2_BASE->CNT + 300; // Next byte should show up within 15us=1.5 byte
|
||||||
TIMER2_BASE->SR = 0x1E5F & ~TIMER_SR_CC2IF; // Clear Timer2/Comp2 interrupt flag
|
TIMER2_BASE->SR = 0x1E5F & ~TIMER_SR_CC2IF; // Clear Timer2/Comp2 interrupt flag
|
||||||
TIMER2_BASE->DIER |= TIMER_DIER_CC2IE; // Enable Timer2/Comp2 interrupt
|
TIMER2_BASE->DIER |= TIMER_DIER_CC2IE; // Enable Timer2/Comp2 interrupt
|
||||||
#else
|
#else
|
||||||
|
TX_RX_PAUSE_on;
|
||||||
|
tx_pause();
|
||||||
cli(); // Disable global int due to RW of 16 bits registers
|
cli(); // Disable global int due to RW of 16 bits registers
|
||||||
OCR1B = TCNT1 + 300; // Next byte should show up within 15us=1.5 byte
|
OCR1B = TCNT1 + 300; // Next byte should show up within 15us=1.5 byte
|
||||||
sei(); // Enable global int
|
sei(); // Enable global int
|
||||||
@ -2076,9 +2076,9 @@ static uint32_t random_id(uint16_t address, uint8_t create_new)
|
|||||||
TIMER2_BASE->DIER &= ~TIMER_DIER_CC2IE; // Disable Timer2/Comp2 interrupt
|
TIMER2_BASE->DIER &= ~TIMER_DIER_CC2IE; // Disable Timer2/Comp2 interrupt
|
||||||
#else
|
#else
|
||||||
CLR_TIMSK1_OCIE1B; // Disable interrupt on compare B match
|
CLR_TIMSK1_OCIE1B; // Disable interrupt on compare B match
|
||||||
#endif
|
|
||||||
TX_RX_PAUSE_off;
|
TX_RX_PAUSE_off;
|
||||||
tx_resume();
|
tx_resume();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#if not defined (ORANGE_TX) && not defined (STM32_BOARD)
|
#if not defined (ORANGE_TX) && not defined (STM32_BOARD)
|
||||||
cli() ;
|
cli() ;
|
||||||
@ -2117,9 +2117,9 @@ static uint32_t random_id(uint16_t address, uint8_t create_new)
|
|||||||
TIMER2_BASE->DIER &= ~TIMER_DIER_CC2IE; // Disable Timer2/Comp2 interrupt
|
TIMER2_BASE->DIER &= ~TIMER_DIER_CC2IE; // Disable Timer2/Comp2 interrupt
|
||||||
#else
|
#else
|
||||||
CLR_TIMSK1_OCIE1B; // Disable interrupt on compare B match
|
CLR_TIMSK1_OCIE1B; // Disable interrupt on compare B match
|
||||||
#endif
|
|
||||||
TX_RX_PAUSE_off;
|
TX_RX_PAUSE_off;
|
||||||
tx_resume();
|
tx_resume();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif //ENABLE_SERIAL
|
#endif //ENABLE_SERIAL
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@
|
|||||||
#define SPORT_SEND
|
#define SPORT_SEND
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if not defined(MULTI_TELEMETRY)
|
#if not defined(MULTI_TELEMETRY) || not defined(STM32_BOARD)
|
||||||
#undef MULTI_SYNC
|
#undef MULTI_SYNC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -268,10 +268,10 @@
|
|||||||
//Use with er9x/erksy9x, for OpenTX MULTI_TELEMETRY below is preferred instead
|
//Use with er9x/erksy9x, for OpenTX MULTI_TELEMETRY below is preferred instead
|
||||||
//#define MULTI_STATUS
|
//#define MULTI_STATUS
|
||||||
|
|
||||||
//Comment to send Multi status and allow OpenTX to autodetect the telemetry format
|
//Sends Multi status and allow OpenTX to autodetect the telemetry format. Comment to disable.
|
||||||
//Supported by OpenTX version 2.2 RC9 and newer. NOT supported by er9x/ersky9x use MULTI_STATUS instead.
|
//Supported by OpenTX version 2.2 RC9 and newer. NOT supported by er9x/ersky9x use MULTI_STATUS instead.
|
||||||
#define MULTI_TELEMETRY
|
#define MULTI_TELEMETRY
|
||||||
//Comment to not sync OpenTX and module together
|
//Sync OpenTX frames with the current protocol timing. This feature is only available on the STM32 module. Comment to disable.
|
||||||
#define MULTI_SYNC
|
#define MULTI_SYNC
|
||||||
|
|
||||||
//Comment a line to disable a specific protocol telemetry
|
//Comment a line to disable a specific protocol telemetry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user