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

📄 local.h

📁 bluetooth 驱动
💻 H
字号:
/* * local.h -- Kernel specific typedefs for use outside the linux kernel * * Copyright (C) 2000, 2001  Axis Communications AB * * Author: Mats Friden <mats.friden@axis.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * Exceptionally, Axis Communications AB grants discretionary and * conditional permissions for additional use of the text contained * in the company's release of the AXIS OpenBT Stack under the * provisions set forth hereunder. * * Provided that, if you use the AXIS OpenBT Stack with other files, * that do not implement functionality as specified in the Bluetooth * System specification, to produce an executable, this does not by * itself cause the resulting executable to be covered by the GNU * General Public License. Your use of that executable is in no way * restricted on account of using the AXIS OpenBT Stack code with it. * * This exception does not however invalidate any other reasons why * the executable file might be covered by the provisions of the GNU * General Public License. * * $Id: local.h,v 1.5 2001/07/31 16:50:41 pkj Exp $ * */#ifndef LOCAL_H#define LOCAL_H/****************** INCLUDE FILES SECTION ***********************************//****************** CONSTANT AND MACRO SECTION ******************************/#include <asm/byteorder.h>/* In kernel mode either __LITTLE_ENDIAN or __BIG_ENDIAN is defined, but in user usermode * both are defined. In usermode __BYTE_ORDER contains the correct endianess. So let's undefine * one of them. * __LITTLE_ENDIAN_BITTFIELD and __BIG_ENDIAN_BITFIELD do not cause such problems. */#ifndef __KERNEL__# if (__BYTE_ORDER == __LITTLE_ENDIAN)#  undef __BIG_ENDIAN# endif# if (__BYTE_ORDER == __BIG_ENDIAN)#  undef __LITTLE_ENDIAN# endif#endif #ifndef __KERNEL__ #  ifdef __LITTLE_ENDIAN#    define cpu_to_le16(x) (x)#    define cpu_to_le32(x) (x)#    define cpu_to_be16(x) htons((x))#    define cpu_to_be32(x) htonl((x))#  else#    define cpu_to_be16(x) (x)#    define cpu_to_be32(x) (x)     extern inline __u16 cpu_to_le16(__u16 x) { return (x<<8) | (x>>8);}     extern inline __u32 cpu_to_le32(__u32 x) { return((x>>24) |             ((x>>8)&0xff00) | ((x<<8)&0xff0000) | (x<<24));}#  endif #  define le16_to_cpu(x)  cpu_to_le16(x)#  define le32_to_cpu(x)  cpu_to_le32(x)#  define be16_to_cpu(x)  cpu_to_be16(x)#  define be32_to_cpu(x)  cpu_to_be32(x) #endif/****************** TYPE DEFINITION SECTION *********************************/typedef short           s16; typedef int             s32;  typedef unsigned short  u16; typedef unsigned int    u32;typedef unsigned char   u8; /****************** EXPORTED FUNCTION DECLARATION SECTION *******************/#endif/****************** END OF FILE local.h *************************************/

⌨️ 快捷键说明

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