added byteorder utils
This commit is contained in:
parent
462d9f3a32
commit
e2039ec2f4
|
@ -14,6 +14,7 @@ OBJS += crc.o
|
|||
OBJS += menu.o
|
||||
OBJS += xxtea.o
|
||||
OBJS += ecc.o
|
||||
OBJS += byteorder.o
|
||||
|
||||
LIBNAME=basic
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#include <stdint.h>
|
||||
|
||||
void uint32touint8p(uint32_t v, uint8_t *p)
|
||||
{
|
||||
*p++ = (v>>24)&0xFF;
|
||||
*p++ = (v>>16)&0xFF;
|
||||
*p++ = (v>> 8)&0xFF;
|
||||
*p++ = (v>> 0)&0xFF;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef _BYTEORDER_H_
|
||||
#define _BYTEORDER_H_
|
||||
void uint32touint8p(uint32_t v, uint8_t *p);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue