Index: src/platform/vboot_reference/include/utility.h |
diff --git a/src/platform/vboot_reference/include/utility.h b/src/platform/vboot_reference/include/utility.h |
index 5dc6d2838951c627af4ffc15b76672435d39439f..79713477c882e71b5d3735de37a6eba70fab16d1 100644 |
--- a/src/platform/vboot_reference/include/utility.h |
+++ b/src/platform/vboot_reference/include/utility.h |
@@ -13,6 +13,14 @@ |
#include <inttypes.h> |
#include <string.h> |
+/* Combine [msw] and [lsw] uint16s to a uint32_t with its [msw] and |
+ * [lsw] forming the most and least signficant 16-bit words. |
+ */ |
+#define CombineUint16Pair(msw,lsw) (((msw) << 16) | \ |
+ (((lsw)) & 0xFFFF)) |
+/* Return the minimum of (a) or (b). */ |
+#define Min(a, b) (((a) < (b)) ? (a) : (b)) |
+ |
/* Allocate [size] bytes and return a pointer to the allocated memory. Abort |
* on error. |
*/ |