1 2 /* 3 * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. 4 * SPDX-License-Identifier: ISC 5 */ 6 7 8 9 10 #ifndef HAL_COMDEF_H 11 #define HAL_COMDEF_H 12 13 14 15 16 #ifndef _ARM_ASM_ 17 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #include "com_dtypes.h" 24 25 26 27 28 #ifndef _BOOL32_DEFINED 29 typedef unsigned long int bool32; 30 #define _BOOL32_DEFINED 31 #endif 32 33 34 #define HAL_ENUM_32BITS(x) HAL_##x##_FORCE32BITS = 0x7FFFFFFF 35 36 37 38 39 40 #define inp(port) (*((volatile byte *) (port))) 41 #define inpw(port) (*((volatile word *) (port))) 42 #define inpdw(port) (*((volatile dword *)(port))) 43 44 #define outp(port, val) (*((volatile byte *) (port)) = ((byte) (val))) 45 #define outpw(port, val) (*((volatile word *) (port)) = ((word) (val))) 46 #define outpdw(port, val) (*((volatile dword *) (port)) = ((dword) (val))) 47 48 #ifdef __cplusplus 49 } 50 #endif 51 52 #endif 53 54 #endif 55 56