projects
/
moodlight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
now also decoding the 'repeat' code.
[moodlight.git]
/
ircontrol.c
diff --git
a/ircontrol.c
b/ircontrol.c
index 65a6ccda0bbd1cb05bc62714b5f52c6feffde9cc..e0e5317927a36c722d96a00738e68feab63242dc 100644
(file)
--- a/
ircontrol.c
+++ b/
ircontrol.c
@@
-1,4
+1,4
@@
-/* $Id: ircontrol.c,v 1.
3 2010/06/27 22:49:58
simimeie Exp $
+/* $Id: ircontrol.c,v 1.
4 2010/06/27 23:05:55
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.
@@
-34,6
+34,7
@@
#define NECPULSELEN ((CPUFREQ * 56UL) / 100000UL)
#define NECZEROLEN ((CPUFREQ * 112UL) / 100000UL)
#define NECONELEN ((CPUFREQ * 225UL) / 100000UL)
#define NECPULSELEN ((CPUFREQ * 56UL) / 100000UL)
#define NECZEROLEN ((CPUFREQ * 112UL) / 100000UL)
#define NECONELEN ((CPUFREQ * 225UL) / 100000UL)
+#define NECREPEATLEN ((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".
@@
-120,6
+121,11
@@
ISR(PCINT0_vect) {
curcodebit = 0;
codebytes[0] = codebytes[1] = codebytes[2] = codebytes[3] = 0;
}
curcodebit = 0;
codebytes[0] = codebytes[1] = codebytes[2] = codebytes[3] = 0;
}
+ } else if ((ts0diff >= (( 8 * NECREPEATLEN) / 10))
+ && (ts0diff <= ((12 * NECREPEATLEN) / 10))) {
+ if (curcodebit == 0xfe) {
+ console_printpgm_P(PSTR(".REP."));
+ }
}
last1irqts = curirqts;
}
}
last1irqts = curirqts;
}
This page took
0.048496 seconds
and
4
git commands to generate.