1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 04:45:17 +03:00

Fixes for v4 board

This commit is contained in:
bsongis 2012-01-23 21:23:19 +00:00
parent 5de422d287
commit 358ec39304

View file

@ -722,21 +722,33 @@ ISR(TIMER1_COMPC_vect) // DSM2 or PXX end of frame
void set_timer3_capture()
{
#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
#endif
DDRE &= ~0x80; PORTE |= 0x80 ; // Bit 7 input + pullup
TCCR3B = 0 ; // Stop counter
TCCR3A = 0;
TCCR3B = (1<<ICNC3) | (2<<CS30); //ICNC3 16MHz / 8
#if defined (PCBV3)
TIMSK3 |= (1<<ICIE3);
#else
ETIMSK |= (1<<TICIE3);
#endif
#endif
}
#if defined(PPM16)
void set_timer3_ppm()
{
#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
TCCR3B = 0 ; // Stop counter