projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Transform 'u16' to 'uint16_t'
[fw/openocd]
/
src
/
helper
/
types.h
diff --git
a/src/helper/types.h
b/src/helper/types.h
index 4ea66e2495831cf6be17e0dc78424d47d6675667..44967bd31a4e967eaaa5e1fd51d6d919c4e1f49d 100644
(file)
--- a/
src/helper/types.h
+++ b/
src/helper/types.h
@@
-34,8
+34,8
@@
typedef unsigned char uint8_t;
#endif
typedef unsigned char uint8_t;
#endif
-#ifndef u
16
-typedef unsigned short u
16
;
+#ifndef u
int16_t
+typedef unsigned short u
int16_t
;
#endif
#ifndef u32
#endif
#ifndef u32
@@
-93,9
+93,9
@@
static inline u32 le_to_h_u32(const uint8_t* buf)
return (u32)(buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24);
}
return (u32)(buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24);
}
-static inline u
16
le_to_h_u16(const uint8_t* buf)
+static inline u
int16_t
le_to_h_u16(const uint8_t* buf)
{
{
- return (u
16
)(buf[0] | buf[1] << 8);
+ return (u
int16_t
)(buf[0] | buf[1] << 8);
}
static inline u32 be_to_h_u32(const uint8_t* buf)
}
static inline u32 be_to_h_u32(const uint8_t* buf)
@@
-103,9
+103,9
@@
static inline u32 be_to_h_u32(const uint8_t* buf)
return (u32)(buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24);
}
return (u32)(buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24);
}
-static inline u
16
be_to_h_u16(const uint8_t* buf)
+static inline u
int16_t
be_to_h_u16(const uint8_t* buf)
{
{
- return (u
16
)(buf[1] | buf[0] << 8);
+ return (u
int16_t
)(buf[1] | buf[0] << 8);
}
static inline void h_u32_to_le(uint8_t* buf, int val)
}
static inline void h_u32_to_le(uint8_t* buf, int val)