mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 13:25:20 +03:00
Fixes for v4 board
This commit is contained in:
parent
5de422d287
commit
358ec39304
1 changed files with 13 additions and 1 deletions
|
@ -722,21 +722,33 @@ ISR(TIMER1_COMPC_vect) // DSM2 or PXX end of frame
|
||||||
void set_timer3_capture()
|
void set_timer3_capture()
|
||||||
{
|
{
|
||||||
#ifndef SIMU
|
#ifndef SIMU
|
||||||
|
#if defined (PCBV3)
|
||||||
|
TIMSK3 &= ~( (1<<OCIE3A) | (1<<OCIE3B) | (1<<OCIE3C) ) ; // Stop compare interrupts // TODO Cam please could you check this line please? Thanks a lot!
|
||||||
|
#else
|
||||||
ETIMSK &= ~( (1<<OCIE3A) | (1<<OCIE3B) | (1<<OCIE3C) ) ; // Stop compare interrupts
|
ETIMSK &= ~( (1<<OCIE3A) | (1<<OCIE3B) | (1<<OCIE3C) ) ; // Stop compare interrupts
|
||||||
|
#endif
|
||||||
DDRE &= ~0x80; PORTE |= 0x80 ; // Bit 7 input + pullup
|
DDRE &= ~0x80; PORTE |= 0x80 ; // Bit 7 input + pullup
|
||||||
|
|
||||||
TCCR3B = 0 ; // Stop counter
|
TCCR3B = 0 ; // Stop counter
|
||||||
TCCR3A = 0;
|
TCCR3A = 0;
|
||||||
TCCR3B = (1<<ICNC3) | (2<<CS30); //ICNC3 16MHz / 8
|
TCCR3B = (1<<ICNC3) | (2<<CS30); //ICNC3 16MHz / 8
|
||||||
|
#if defined (PCBV3)
|
||||||
|
TIMSK3 |= (1<<ICIE3);
|
||||||
|
#else
|
||||||
ETIMSK |= (1<<TICIE3);
|
ETIMSK |= (1<<TICIE3);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PPM16)
|
#if defined(PPM16)
|
||||||
void set_timer3_ppm()
|
void set_timer3_ppm()
|
||||||
{
|
{
|
||||||
#ifndef SIMU
|
#ifndef SIMU
|
||||||
ETIMSK &= ~( 1<<TICIE3) ; // Stop capture interrupt
|
#if defined (PCBV3)
|
||||||
|
TIMSK3 &= ~(1<<ICIE3);
|
||||||
|
#else
|
||||||
|
ETIMSK &= ~(1<<TICIE3) ; // Stop capture interrupt
|
||||||
|
#endif
|
||||||
DDRE |= 0x80; // Bit 7 output
|
DDRE |= 0x80; // Bit 7 output
|
||||||
|
|
||||||
TCCR3B = 0 ; // Stop counter
|
TCCR3B = 0 ; // Stop counter
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue