summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/xt.h
diff options
context:
space:
mode:
authorWilliam Chang <william@factual.com>2019-11-20 22:17:07 -0800
committerWilliam Chang <william@factual.com>2019-11-20 22:17:07 -0800
commite7f4d56592b3975c38af329e77b4efd9108495e8 (patch)
tree0a416bccbf70bfdbdb9ffcdb3bf136b47378c014 /tmk_core/protocol/xt.h
parent71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (diff)
parent8416a94ad27b3ff058576f09f35f0704a8b39ff3 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'tmk_core/protocol/xt.h')
-rw-r--r--tmk_core/protocol/xt.h56
1 files changed, 29 insertions, 27 deletions
diff --git a/tmk_core/protocol/xt.h b/tmk_core/protocol/xt.h
index 93bc5daf82..e7e1a13f4d 100644
--- a/tmk_core/protocol/xt.h
+++ b/tmk_core/protocol/xt.h
@@ -39,33 +39,35 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef XT_H
#define XT_H
-#define XT_DATA_IN() do { \
- XT_DATA_DDR &= ~(1<<XT_DATA_BIT); \
- XT_DATA_PORT |= (1<<XT_DATA_BIT); \
-} while (0)
-
-#define XT_DATA_READ() (XT_DATA_PIN&(1<<XT_DATA_BIT))
-
-#define XT_DATA_LO() do { \
- XT_DATA_PORT &= ~(1<<XT_DATA_BIT); \
- XT_DATA_DDR |= (1<<XT_DATA_BIT); \
-} while (0)
-
-
-#define XT_CLOCK_IN() do { \
- XT_CLOCK_DDR &= ~(1<<XT_CLOCK_BIT); \
- XT_CLOCK_PORT |= (1<<XT_CLOCK_BIT); \
-} while (0)
-
-#define XT_CLOCK_READ() (XT_CLOCK_PIN&(1<<XT_CLOCK_BIT))
-
-#define XT_CLOCK_LO() do { \
- XT_CLOCK_PORT &= ~(1<<XT_CLOCK_BIT); \
- XT_CLOCK_DDR |= (1<<XT_CLOCK_BIT); \
-} while (0)
-
-
-void xt_host_init(void);
+#define XT_DATA_IN() \
+ do { \
+ XT_DATA_DDR &= ~(1 << XT_DATA_BIT); \
+ XT_DATA_PORT |= (1 << XT_DATA_BIT); \
+ } while (0)
+
+#define XT_DATA_READ() (XT_DATA_PIN & (1 << XT_DATA_BIT))
+
+#define XT_DATA_LO() \
+ do { \
+ XT_DATA_PORT &= ~(1 << XT_DATA_BIT); \
+ XT_DATA_DDR |= (1 << XT_DATA_BIT); \
+ } while (0)
+
+#define XT_CLOCK_IN() \
+ do { \
+ XT_CLOCK_DDR &= ~(1 << XT_CLOCK_BIT); \
+ XT_CLOCK_PORT |= (1 << XT_CLOCK_BIT); \
+ } while (0)
+
+#define XT_CLOCK_READ() (XT_CLOCK_PIN & (1 << XT_CLOCK_BIT))
+
+#define XT_CLOCK_LO() \
+ do { \
+ XT_CLOCK_PORT &= ~(1 << XT_CLOCK_BIT); \
+ XT_CLOCK_DDR |= (1 << XT_CLOCK_BIT); \
+ } while (0)
+
+void xt_host_init(void);
uint8_t xt_host_recv(void);
#endif