]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - tmk_core/protocol/xt_io.h
xt_usb: Fix warning on switch-case
[max/tmk_keyboard.git] / tmk_core / protocol / xt_io.h
1 #ifndef XT_IO_H
2 #define XT_IO_H
3
4 #define XT_DATA_IN()        do { \
5     XT_DATA_DDR  &= ~(1<<XT_DATA_BIT); \
6     XT_DATA_PORT |=  (1<<XT_DATA_BIT); \
7 } while (0)
8
9 #define XT_DATA_READ()      (XT_DATA_PIN&(1<<XT_DATA_BIT))
10
11 #define XT_DATA_LO()        do { \
12     XT_DATA_PORT &= ~(1<<XT_DATA_BIT); \
13     XT_DATA_DDR  |=  (1<<XT_DATA_BIT); \
14 } while (0)
15
16
17 #define XT_CLOCK_IN()       do { \
18     XT_CLOCK_DDR  &= ~(1<<XT_CLOCK_BIT); \
19     XT_CLOCK_PORT |=  (1<<XT_CLOCK_BIT); \
20 } while (0)
21
22 #define XT_CLOCK_READ()     (XT_CLOCK_PIN&(1<<XT_CLOCK_BIT))
23
24 #define XT_CLOCK_LO()       do { \
25     XT_CLOCK_PORT &= ~(1<<XT_CLOCK_BIT); \
26     XT_CLOCK_DDR  |=  (1<<XT_CLOCK_BIT); \
27 } while (0)
28
29 #endif