⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 byteorder.h

📁 pxa270 的bootloader源码
💻 H
字号:
#ifndef _MAIN_H#define _MAIN_H// Byte swapping.#define swap8(A)		(A)#define swap16(A)		((((A)&0x00ff)<<8) | ((A)>>8))#define swap32(A)		((((A)&0x000000ff)<<24) | (((A)&0x0000ff00)<<8) | (((A)&0x00ff0000)>>8) | (((A)&0xff000000)>>24))#define htonl(x)		swap32(x)	// host to network, long#define ntohl(x)		swap32(x)	// network to host, long#define htons(x)		swap16(x)	// host to network, short#define ntohs(x)		swap16(x)	// network to host, short#define htobl(x)		swap32(x)	// host to big endian, long#define btohl(x)		swap32(x)	// big endian to host, long#define htobs(x)		swap32(x)	// host to big endian, short#define btohs(x)		swap32(x)	// big endian to host, short#define htoll(x)		(x)			// host to little endian, long#define ltohl(x)		(x)			// little endian to host, long#define htols(x)		(x)			// host to little endian, short#define ltohs(x)		(x)			// little endian to host, short#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -