9 MM_FIRST_SLOW_SAMPLE
, /* If clock arrives, we stay on the fast path! */
11 MM_FAST_WAIT_FOR_CLOCK
,
14 MM_SLOW_WAIT_FOR_CLOCK_DELAY
,
15 MM_SLOW_WAIT_FOR_CLOCK
,
18 #ifdef MM_USE_REGISTER_VARS
20 uint8_t register shift_command
asm("r2");
21 uint8_t register shift_function
asm("r3");
22 uint8_t register shift_address
asm("r4");
23 uint8_t register recstate
asm("r5");
24 uint8_t register bitno
asm("r6");
26 static void inline __attribute((unused
)) mm_init(void)
39 * mm_switch_command - Callback function!
41 * This function must be defined whenever the mm_switch module is used.
42 * It will be called from interrupt context whenever a new valid command
45 * decoder is in the range from 1 to 25. Other values will not occur.
47 * key is in the range from 0 to 8:
49 * 1 - key1 green pressed
50 * 2 - key1 red pressed
51 * 3 - key2 green pressed
52 * 4 - key2 red pressed
57 void mm_switch_command(uint8_t decoder
, uint8_t key
);
62 void mm_switch_drive_cb(uint8_t address
, uint8_t speed
, uint8_t functions
, uint8_t flags
);
64 void mm_switch_drive(uint8_t decoder
, uint8_t function
, uint8_t command
);
66 void mm_pinchange_handler(void);