i actually mixed up all 0 and 1 bits - "oups". Luckily this has no effect except...
authorsimimeie <simimeie>
Sun, 27 Jun 2010 22:49:58 +0000 (22:49 +0000)
committersimimeie <simimeie>
Sun, 27 Jun 2010 22:49:58 +0000 (22:49 +0000)
ircontrol.c

index 7ae665a41b439f89f296d4fc0508ae1363554a38..65a6ccda0bbd1cb05bc62714b5f52c6feffde9cc 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: ircontrol.c,v 1.2 2010/06/27 22:20:39 simimeie Exp $
+/* $Id: ircontrol.c,v 1.3 2010/06/27 22:49:58 simimeie Exp $
  * Functions for the infrared receiver
  *
  * The infrared receiver is connected to PB0 / PCINT0.
  * Functions for the infrared receiver
  *
  * The infrared receiver is connected to PB0 / PCINT0.
 
 /* For NEC, we start with a 9000 us pulse, then 4500 us silence.
  * Then the bits follow:
 
 /* For NEC, we start with a 9000 us pulse, then 4500 us silence.
  * Then the bits follow:
- * a 0 is a 560 us pulse followed by 1690 us of silence.
- * a 1 is a 560 us pulse followed by  560 us of silence.
+ * a 1 is a 560 us pulse followed by 1690 us of silence.
+ * a 0 is a 560 us pulse followed by  560 us of silence.
  * These values equal the following cpu cycle counts:
  *  9000 us = 72000 cc, 4500 us = 36000 cc, 560 us = 4480, 1690 us = 13520 cc
  */
 #define NECSTARTLEN1 ((CPUFREQ *   9UL) / 1000UL)
 #define NECSTARTLEN2 ((CPUFREQ *  45UL) / 10000UL)
 #define NECPULSELEN  ((CPUFREQ *  56UL) / 100000UL)
  * These values equal the following cpu cycle counts:
  *  9000 us = 72000 cc, 4500 us = 36000 cc, 560 us = 4480, 1690 us = 13520 cc
  */
 #define NECSTARTLEN1 ((CPUFREQ *   9UL) / 1000UL)
 #define NECSTARTLEN2 ((CPUFREQ *  45UL) / 10000UL)
 #define NECPULSELEN  ((CPUFREQ *  56UL) / 100000UL)
-#define NECONELEN    ((CPUFREQ * 112UL) / 100000UL)
-#define NECZEROLEN   ((CPUFREQ * 225UL) / 100000UL)
+#define NECZEROLEN   ((CPUFREQ * 112UL) / 100000UL)
+#define NECONELEN    ((CPUFREQ * 225UL) / 100000UL)
 
 /* the NEC code contains 4 bytes, sent with LSB first:
  * 0+1 are either the "extended address" or "address and inverted address".
 
 /* the NEC code contains 4 bytes, sent with LSB first:
  * 0+1 are either the "extended address" or "address and inverted address".
This page took 0.048527 seconds and 4 git commands to generate.