File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed
targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/common/bsp Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,16 @@ MBED_PACKED(struct) mbr_table {
38
38
static inline uint32_t tole32 (uint32_t a)
39
39
{
40
40
union {
41
- uint32_t w ;
42
- uint8_t b [4 ];
43
- } s ;
41
+ uint32_t u32 ;
42
+ uint8_t u8 [4 ];
43
+ } w ;
44
44
45
- s. b [0 ] = a >> 0 ;
46
- s. b [1 ] = a >> 8 ;
47
- s. b [2 ] = a >> 16 ;
48
- s. b [3 ] = a >> 24 ;
45
+ w. u8 [0 ] = a >> 0 ;
46
+ w. u8 [1 ] = a >> 8 ;
47
+ w. u8 [2 ] = a >> 16 ;
48
+ w. u8 [3 ] = a >> 24 ;
49
49
50
- return s. w ;
50
+ return w. u32 ;
51
51
}
52
52
53
53
static inline uint32_t fromle32 (uint32_t a)
Original file line number Diff line number Diff line change @@ -63,14 +63,14 @@ typedef signed long long __int64_t;
63
63
typedef unsigned long long __uint64_t ;
64
64
#endif
65
65
66
- #define s8 int8_t
67
- #define u8 uint8_t
68
- #define s16 int16_t
69
- #define u16 uint16_t
70
- #define s32 int32_t
71
- #define u32 uint32_t
72
- #define s64 int64_t
73
- #define u64 uint64_t
66
+ typedef int8_t s8 ;
67
+ typedef uint8_t u8 ;
68
+ typedef int16_t s16 ;
69
+ typedef uint16_t u16 ;
70
+ typedef int32_t s32 ;
71
+ typedef uint32_t u32 ;
72
+ typedef int64_t s64 ;
73
+ typedef uint64_t u64 ;
74
74
75
75
#ifdef CONFIG_MBED_ENABLED
76
76
#ifndef BOOL
You can’t perform that action at this time.
0 commit comments