mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 00:35:18 +03:00
TIFR / TIFR1 for DSM2 pulses
This commit is contained in:
parent
7cc5a37c4b
commit
ddc9a07eef
1 changed files with 4 additions and 4 deletions
|
@ -551,11 +551,11 @@ void setupPulses()
|
||||||
ICR1 = 44000; // Next frame starts in 22 mS
|
ICR1 = 44000; // Next frame starts in 22 mS
|
||||||
#if defined(PCBV3)
|
#if defined(PCBV3)
|
||||||
TIMSK1 &= ~0x3C; // All interrupts off
|
TIMSK1 &= ~0x3C; // All interrupts off
|
||||||
// TODO !!!! TIFR = 0x3C; // Clear all pending interrupts
|
TIFR1 = 0x2F;
|
||||||
TIMSK1 |= 0x28; // Enable CAPT and COMPB
|
TIMSK1 |= 0x28; // Enable CAPT and COMPB
|
||||||
#else
|
#else
|
||||||
TIMSK &= ~0x3C; // All interrupts off
|
TIMSK &= ~0x3C; // All interrupts off
|
||||||
// TIFR = 0x3C; // Clear all pending interrupts
|
TIFR = 0x3C;
|
||||||
TIMSK |= 0x28; // Enable CAPT and COMPB
|
TIMSK |= 0x28; // Enable CAPT and COMPB
|
||||||
#endif
|
#endif
|
||||||
TCCR1A = (0 << WGM10);
|
TCCR1A = (0 << WGM10);
|
||||||
|
@ -575,11 +575,11 @@ void setupPulses()
|
||||||
TCNT1 = 0;
|
TCNT1 = 0;
|
||||||
#if defined(PCBV3)
|
#if defined(PCBV3)
|
||||||
TIMSK1 &= ~0x3C; // All interrupts off
|
TIMSK1 &= ~0x3C; // All interrupts off
|
||||||
// TODO !!! TIFR = 0x3C; // Clear all pending interrupts
|
TIFR1 = 0x2F;
|
||||||
TIMSK1 |= 0x10; // Enable COMPA
|
TIMSK1 |= 0x10; // Enable COMPA
|
||||||
#else
|
#else
|
||||||
TIMSK &= ~0x3C; // All interrupts off
|
TIMSK &= ~0x3C; // All interrupts off
|
||||||
// TIFR = 0x3C; // Clear all pending interrupts
|
TIFR = 0x3C;
|
||||||
TIMSK |= 0x10; // Enable COMPA
|
TIMSK |= 0x10; // Enable COMPA
|
||||||
#endif
|
#endif
|
||||||
TCCR1A = (0 << WGM10);
|
TCCR1A = (0 << WGM10);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue