added a static_assert about the size
diff --git a/gyro_board/src/usb/data_struct.h b/gyro_board/src/usb/data_struct.h
index d0a740b..ac86a1a 100644
--- a/gyro_board/src/usb/data_struct.h
+++ b/gyro_board/src/usb/data_struct.h
@@ -81,3 +81,10 @@
};
};
#pragma pack(pop)
+
+#ifdef __cplusplus
+// TODO(brians): Consider using C1X's _Static_assert once we have a compiler
+// (GCC 4.6) + flags that support it.
+static_assert(sizeof(DATA_STRUCT_NAME) <= 64,
+ "We only have room for 64 bytes in the USB packet.");
+#endif // defined(__cplusplus)