diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-08-30 15:01:52 -0700 |
commit | b624f32f944acdc59dcb130674c09090c5c404cb (patch) | |
tree | bc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /tmk_core/protocol/xt.h | |
parent | 61af76a10d00aba185b8338604171de490a13e3b (diff) |
clang-format changes
Diffstat (limited to 'tmk_core/protocol/xt.h')
-rw-r--r-- | tmk_core/protocol/xt.h | 56 |
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 |