3 /*****************************************************************************
5 (c) Cambridge Silicon Radio Limited 2010
6 All rights reserved and confidential information of CSR
8 Refer to LICENSE.txt included with this source for details
11 *****************************************************************************/
13 #include <linux/stddef.h>
14 #include <linux/kernel.h>
15 #include <linux/types.h>
16 #include <linux/string.h>
17 #include <asm/byteorder.h>
30 typedef size_t CsrSize; /* Return type of sizeof (ISO/IEC 9899:1990 7.1.6) */
31 typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */
32 typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
33 typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
35 /* Unsigned fixed width types */
36 typedef uint8_t CsrUint8;
37 typedef uint16_t CsrUint16;
38 typedef uint32_t CsrUint32;
40 /* Signed fixed width types */
41 typedef int8_t CsrInt8;
42 typedef int16_t CsrInt16;
43 typedef int32_t CsrInt32;
46 typedef CsrUint8 CsrBool;
49 typedef char CsrCharString;
50 typedef CsrUint8 CsrUtf8String;
51 typedef CsrUint16 CsrUtf16String; /* 16-bit UTF16 strings */
52 typedef CsrUint32 CsrUint24;
57 * Note: If a given compiler does not support 64-bit types, it is
58 * OK to omit these definitions; 32-bit versions of the code using
59 * these types may be available. Consult the relevant documentation
60 * or the customer support group for information on this.
62 #define CSR_HAVE_64_BIT_INTEGERS
63 typedef uint64_t CsrUint64;
64 typedef int64_t CsrInt64;