xref: /wlan-driver/fw-api/hw/kiwi/v1/HALcomdef.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /*
3  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 
21 #ifndef HAL_COMDEF_H
22 #define HAL_COMDEF_H
23 
24 
25 
26 
27 #ifndef _ARM_ASM_
28 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include "com_dtypes.h"
35 
36 
37 
38 
39 #ifndef _BOOL32_DEFINED
40 typedef  unsigned long int  bool32;
41 #define _BOOL32_DEFINED
42 #endif
43 
44 
45 #define HAL_ENUM_32BITS(x) HAL_##x##_FORCE32BITS = 0x7FFFFFFF
46 
47 
48 
49 
50 
51   #define inp(port)         (*((volatile byte *) (port)))
52   #define inpw(port)        (*((volatile word *) (port)))
53   #define inpdw(port)       (*((volatile dword *)(port)))
54 
55   #define outp(port, val)   (*((volatile byte *) (port)) = ((byte) (val)))
56   #define outpw(port, val)  (*((volatile word *) (port)) = ((word) (val)))
57   #define outpdw(port, val) (*((volatile dword *) (port)) = ((dword) (val)))
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif
64 
65 #endif
66 
67