* Check for stuff we need
*
*/
-#if !defined(MM_TSTART_FAST) || !defined(MM_TSTART_SLOW) || !defined(MM_TSTOP) \
- || !defined(MM_SENSE) || !defined(MM_TIMER_INT_VECT)
+#if !defined(MM_TSTART) || !defined(MM_SENSE) || !defined(MM_TIMER_INT_VECT)
-#error Missing timer start macro MM_TSTART_FAST!
+#error Missing needed MM_... macro!
#endif
uint8_t address;
uint8_t command;
- MM_TSTART_FAST;
-
#ifdef MM_FILTER_REPEATED
static uint8_t address_last = 0xff;
static uint8_t function_last = 0xff;
static uint8_t command_last = 0xff;
#endif
+ MM_TSTART;
+
switch(recstate) {
-
case MM_FIRST_FAST_SAMPLE:
- recstate = MM_FIRST_SLOW_SAMPLE ;
+ recstate = MM_FIRST_SLOW_SAMPLE;
break;
case MM_FIRST_SLOW_SAMPLE:
case MM_SLOW_WAIT_FOR_CLOCK:
if (mm_rec_tolerated_timeouts) {
+ trigger();
mm_rec_tolerated_timeouts--;
recstate = MM_SLOW_WAIT_FOR_CLOCK_DELAY;
return;
shift_function_first = shift_function;
shift_command_first = shift_command;
mm_rec_tolerated_timeouts = 18;
+ trigger();
}
if (bitno == 36) {
if (!sense_last)
return;
- MM_TSTART_FAST;
+ MM_TSTART;
switch(recstate) {
case MM_IDLE:
mm_rec_tolerated_timeouts = 0;
break;
+ case MM_SLOW_SAMPLE_DELAY:
+ recstate = MM_SLOW_SAMPLE;
+ break;
/* Not expected */
case MM_FIRST_FAST_SAMPLE:
case MM_FAST_SAMPLE: