📄 util.h
字号:
/*-----------------------------------------------------------------------------\
@ModuleName :: util.h
@Description :: Header file for Utility routines
@Copyright :: Copyright 2001- Texas Instruments, Inc.
@History ::
-------------------------------------------------------------------------------
Dec. 26, 2001 Kedar C (kedarc@ti.com) Start
\-----------------------------------------------------------------------------*/
#ifndef __UTIL_H__
#define __UTIL_H__
#include <system/armsys270.h>
#define DOT fprintf(stderr, "\n.")
#define MAKE_TAG(a, b, c, d) ( (Uint32)(a<<24 ) + (b<<16) + (c<< 8) + (d) )
#define BYTE_SWAP16(word) ( ((word) >> 8 ) + ((word) << 8) )
/* structs */
typedef struct {
Uint8 *addr;
Uint32 ix;
} WordStream;
/* support routines */
void put_str(WordStream *ptr, Uint8 *str);
void put_word16(WordStream *ptr, Uint16 word);
void put_word32(WordStream *ptr, Uint32 word);
Uint16 get_word16( Uint8 *start );
Uint32 get_word32( Uint8 *start );
Uint32 byte_swap32(Uint32 word);
Uint16 byte_swap16(Uint16 word);
Uint8 *find_word16(Uint8 *start, Uint8 *end, const Uint16 word );
#endif /* __UTIL_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -