Commit | Line | Data |
---|---|---|
70095677 PH |
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 | void mm_pinchange_handler(void); | |
28 | ||
29 | void mm_init(void); | |
30 | ||
31 | ||
32 | ||
33 | ||
34 | ||
35 | #endif |