diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-18 07:07:59 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-18 07:07:59 +0000 |
commit | f876d5e9c769a288faa7fd14b7bf373363542aab (patch) | |
tree | 86ad76530f7d44c69471813c4c727f107b018eb5 /src/helper | |
parent | c18947b947064e7eceed8047c42d4c8dfd8ae964 (diff) |
Transform 'u16' to 'uint16_t'
- Replace '\([^_]\)u16' with '\1uint16_t'.
- Replace '^u16' with 'uint16_t'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/types.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/helper/types.h b/src/helper/types.h index 4ea66e24..44967bd3 100644 --- a/src/helper/types.h +++ b/src/helper/types.h @@ -34,8 +34,8 @@ typedef unsigned char uint8_t; #endif -#ifndef u16 -typedef unsigned short u16; +#ifndef uint16_t +typedef unsigned short uint16_t; #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); } -static inline u16 le_to_h_u16(const uint8_t* buf) +static inline uint16_t le_to_h_u16(const uint8_t* buf) { - return (u16)(buf[0] | buf[1] << 8); + return (uint16_t)(buf[0] | buf[1] << 8); } 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); } -static inline u16 be_to_h_u16(const uint8_t* buf) +static inline uint16_t be_to_h_u16(const uint8_t* buf) { - return (u16)(buf[1] | buf[0] << 8); + return (uint16_t)(buf[1] | buf[0] << 8); } static inline void h_u32_to_le(uint8_t* buf, int val) |