fb36036b8826d6adc20cce591dafdf72d3c850e8
[eisenbahn.git] / trennfix / sw / mm / include / mm / mm_switch.h
1 #ifndef MM_SWITCH_H
2 #define MM_SWITCH_H
3
4 #include <stdint.h>
5
6 /*
7 * mm_switch_command - Callback function!
8 *
9 * This function must be defined whenever the mm_switch module is used.
10 * It will be called from interrupt context whenever a new valid command
11 * has arrived.
12 *
13 * decoder is in the range from 1 to 25. Other values will not occur.
14 *
15 * key is in the range from 0 to 8:
16 *
17 * 1 - key1 green pressed
18 * 2 - key1 red pressed
19 * 3 - key2 green pressed
20 * 4 - key2 red pressed
21 * ...
22 * 0 - all keys up
23 *
24 */
25 void mm_switch_command(uint8_t decoder, uint8_t key);
26
27 /*
28 * empty comment :-)
29 */
30 void mm_switch_drive_cb(uint8_t address, uint8_t speed, uint8_t functions, uint8_t flags);
31
32 void mm_switch_drive(uint8_t decoder, uint8_t function, uint8_t command);
33
34 void mm_pinchange_handler(void);
35
36 void mm_init(void);
37
38 #endif