mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
16 lines
186 B
C
16 lines
186 B
C
#include "uint32.h"
|
|
|
|
void uint32_pack(char s[4], uint32 u)
|
|
{
|
|
/*
|
|
s[0] = u & 255;
|
|
u >>= 8;
|
|
s[1] = u & 255;
|
|
u >>= 8;
|
|
s[2] = u & 255;
|
|
s[3] = u >> 8;
|
|
*/
|
|
|
|
*(uint32*)s = u;
|
|
}
|