We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbac6e5 commit 78825edCopy full SHA for 78825ed
include/sys/byteorder.h
@@ -154,6 +154,21 @@ static inline void sys_put_be32(u32_t val, u8_t dst[4])
154
sys_put_be16(val, &dst[2]);
155
}
156
157
+/**
158
+ * @brief Put a 64-bit integer as big-endian to arbitrary location.
159
+ *
160
+ * Put a 64-bit integer, originally in host endianness, to a
161
+ * potentially unaligned memory location in big-endian format.
162
163
+ * @param val 64-bit integer in host endianness.
164
+ * @param dst Destination memory address to store the result.
165
+ */
166
+static inline void sys_put_be64(u64_t val, u8_t dst[8])
167
+{
168
+ sys_put_be32(val >> 32, dst);
169
+ sys_put_be32(val, &dst[4]);
170
+}
171
+
172
/**
173
* @brief Put a 16-bit integer as little-endian to arbitrary location.
174
*
0 commit comments