mirror of https://github.com/ARMmbed/mbed-os.git
parent
1fa30b7403
commit
02bf926ffb
|
@ -38,16 +38,16 @@ MBED_PACKED(struct) mbr_table {
|
||||||
static inline uint32_t tole32(uint32_t a)
|
static inline uint32_t tole32(uint32_t a)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
uint32_t w;
|
uint32_t u32;
|
||||||
uint8_t b[4];
|
uint8_t u8[4];
|
||||||
} s;
|
} w;
|
||||||
|
|
||||||
s.b[0] = a >> 0;
|
w.u8[0] = a >> 0;
|
||||||
s.b[1] = a >> 8;
|
w.u8[1] = a >> 8;
|
||||||
s.b[2] = a >> 16;
|
w.u8[2] = a >> 16;
|
||||||
s.b[3] = a >> 24;
|
w.u8[3] = a >> 24;
|
||||||
|
|
||||||
return s.w;
|
return w.u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t fromle32(uint32_t a)
|
static inline uint32_t fromle32(uint32_t a)
|
||||||
|
|
|
@ -63,14 +63,14 @@ typedef signed long long __int64_t;
|
||||||
typedef unsigned long long __uint64_t;
|
typedef unsigned long long __uint64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define s8 int8_t
|
typedef int8_t s8;
|
||||||
#define u8 uint8_t
|
typedef uint8_t u8;
|
||||||
#define s16 int16_t
|
typedef int16_t s16;
|
||||||
#define u16 uint16_t
|
typedef uint16_t u16;
|
||||||
#define s32 int32_t
|
typedef int32_t s32;
|
||||||
#define u32 uint32_t
|
typedef uint32_t u32;
|
||||||
#define s64 int64_t
|
typedef int64_t s64;
|
||||||
#define u64 uint64_t
|
typedef uint64_t u64;
|
||||||
|
|
||||||
#ifdef CONFIG_MBED_ENABLED
|
#ifdef CONFIG_MBED_ENABLED
|
||||||
#ifndef BOOL
|
#ifndef BOOL
|
||||||
|
|
Loading…
Reference in New Issue