]> git.droids-corp.org - protos/rc_servos.git/commitdiff
rc_servos: implement bypass mode
authorOlivier MATZ <zer0@platinum>
Thu, 23 Feb 2012 20:22:55 +0000 (21:22 +0100)
committerOlivier MATZ <zer0@platinum>
Thu, 23 Feb 2012 20:46:09 +0000 (21:46 +0100)
main.c

diff --git a/main.c b/main.c
index a27bf10b821ae74236ec19e6ba77324ea936a304..53fd747dc8b45f40a82bc523c3e4045ec2901f97 100644 (file)
--- a/main.c
+++ b/main.c
@@ -24,6 +24,7 @@ static volatile uint8_t rxbuf[16];
 register uint8_t rxlen asm("r2");
 register uint8_t done asm("r3");
 register uint8_t portval asm("r4");
+register uint8_t bypass asm("r5");
 
 SIGNAL(TIMER1_COMPA_vect)
 {
@@ -94,6 +95,10 @@ int main(void)
                                break;
                        poll_spi();
                }
+               /* bypass mode */
+               while (bypass == 1) {
+                       PORTC = PORTB;
+               }
        }
 
        return 0;