summaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2020-04-11 00:48:16 +0000
committerQMK Bot <hello@qmk.fm>2020-04-11 00:48:16 +0000
commitcc38627816b343a2909d50dd0e059daa5986cff9 (patch)
treee14847f2ae4a1c2e46a378fb3728452532e76db5 /tmk_core
parent6c2c3c13e903296e6c7b30e56571034ec175d889 (diff)
format code according to conventions [skip ci]
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/timer.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h
index 117b41d1be..52bc1cc671 100644
--- a/tmk_core/common/timer.h
+++ b/tmk_core/common/timer.h
@@ -25,10 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "avr/timer_avr.h"
#endif
-#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a)-(b))) : ( \
- (max == UINT16_MAX) ? ((uint16_t)((a)-(b))) : ( \
- (max == UINT32_MAX) ? ((uint32_t)((a)-(b))) : ( \
- (a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a) ))))
+#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a)))))
#define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX)
#define TIMER_DIFF_16(a, b) TIMER_DIFF(a, b, UINT16_MAX)
#define TIMER_DIFF_32(a, b) TIMER_DIFF(a, b, UINT32_MAX)