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