blob: 520a79d99be8c15e662b1bd0c4d62113a4f2d060 [file] [log] [blame]
developere0cea0f2021-12-16 16:08:26 +08001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * si_voice_datatypes.h
4 * ProSLIC datatypes file
5 *
6 * Author(s):
7 * laj
8 *
9 * Distributed by:
10 * Silicon Laboratories, Inc
11 *
12 * This file contains proprietary information.
13 * No dissemination allowed without prior written permission from
14 * Silicon Laboratories, Inc.
15 *
16 * File Description:
17 * This is the header file that contains
18 * type definitions for the data types
19 * used in the demonstration code.
20 *
21 */
22#ifndef DATATYPES_H
23#define DATATYPES_H
24#include "proslic_api_config.h"
25
26#ifndef TRUE
27#define TRUE (1)
28#endif
29#ifndef FALSE
30#define FALSE (0)
31#endif
32
33#ifndef NULL
34#define NULL ((void *) 0)
35#endif
36
37#include <linux/types.h>
38typedef u_int8_t BOOLEAN;
39typedef int8_t int8;
40typedef u_int8_t uInt8;
41typedef uInt8 uChar;
42typedef int16_t int16;
43typedef u_int16_t uInt16;
44typedef int32_t int32;
45typedef u_int32_t uInt32;
46typedef u_int32_t ramData;
47
48
49#include <linux/slab.h>
50#include <linux/kernel.h> /* for abs() */
51/* NOTE: kcalloc was introduced in ~2.6.14, otherwise use kzalloc() with (X)*(Y) for the block size */
52#define SIVOICE_CALLOC(X,Y) kcalloc((X),(Y), GFP_KERNEL)
53#define SIVOICE_FREE(X) kfree((X))
54#define SIVOICE_MALLOC(X) kmalloc((X), GFP_KERNEL)
55#define SIVOICE_STRCPY strcpy
56#define SIVOICE_STRNCPY strncpy
57#define SIVOICE_MEMSET memset
58#define SIVOICE_ABS abs
59#endif
60