working beep at around 4khz
[fw/altos] / target / beep / beep.c
index 08422082755f07067bbf5f3c67c8edc2a23d9eb1..09c915b7a0b0b069855fa42d4c8e926332527dcf 100644 (file)
@@ -46,9 +46,11 @@ delay (unsigned char n)
        unsigned char i = 0;
 
        n <<= 1;
-       while (--n != 0)
+       while (--n != 0) {
+               i = 211;
                while (--i != 0)
                        nop();
+       }
 }
 
 void
@@ -78,12 +80,12 @@ low() {
 main ()
 {
        CLKCON = 0;
-       /* Set p1_1 to output */
+       /* Set P2_0 to output */
        P2DIR = 0x01;
        P1INP = 0x00;
        P2INP = 0x00;
        for (;;) {
                high();
-               low();
+/*             low();          */
        }
 }