From 3821c3ab97685fa276d5646e46f7477735633653 Mon Sep 17 00:00:00 2001 From: stevstrong Date: Sat, 24 Mar 2018 10:09:47 +0100 Subject: [PATCH] F4: adds the macro "word" similar to already existing solution for F1 --- STM32F4/cores/maple/wirish_math.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/STM32F4/cores/maple/wirish_math.h b/STM32F4/cores/maple/wirish_math.h index e037372..1510273 100644 --- a/STM32F4/cores/maple/wirish_math.h +++ b/STM32F4/cores/maple/wirish_math.h @@ -149,4 +149,11 @@ double sqrt(double x); */ double pow(double x, double y); +inline uint16_t makeWord( uint16_t w ) { return w; } + +inline uint16_t makeWord( uint8_t h, uint8_t l ) { return (h << 8) | l; } + +#define word(...) makeWord(__VA_ARGS__) + + #endif