developer | e0cea0f | 2021-12-16 16:08:26 +0800 | [diff] [blame^] | 1 | /* 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>
|
| 38 | typedef u_int8_t BOOLEAN;
|
| 39 | typedef int8_t int8;
|
| 40 | typedef u_int8_t uInt8;
|
| 41 | typedef uInt8 uChar;
|
| 42 | typedef int16_t int16;
|
| 43 | typedef u_int16_t uInt16;
|
| 44 | typedef int32_t int32;
|
| 45 | typedef u_int32_t uInt32;
|
| 46 | typedef 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 |
|