[stock / gruvin9x] FrSky and DSM2 serial mode

[Sky9x] Bootloader mode on REVC
This commit is contained in:
bsongis
2012-12-10 10:30:54 +00:00
parent fb7525e42d
commit 2037f0d8b0
8 changed files with 43 additions and 62 deletions
+12
View File
@@ -741,6 +741,12 @@ void setupPulses()
if (s_current_protocol != required_protocol) {
#if defined(DSM2_SERIAL) && defined(FRSKY)
if (s_current_protocol == PROTO_DSM2) {
FRSKY_Init();
}
#endif
s_current_protocol = required_protocol;
TCCR1B = 0; // Stop counter
@@ -824,6 +830,12 @@ void setupPulses()
PORTB &= ~(1<<OUT_B_PPM); // Hold PPM output low
break ;
#if defined(DSM2_SERIAL) && defined(FRSKY)
case PROTO_DSM2:
DSM2_Init();
// no break
#endif
default: // PPM and DSM2=SERIAL modes
set_timer3_capture();
OCR1A = 44000; // Next frame starts in 22ms -- DSM mode.