HALcomdef.h 879 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
  3. * SPDX-License-Identifier: ISC
  4. */
  5. #ifndef HAL_COMDEF_H
  6. #define HAL_COMDEF_H
  7. #ifndef _ARM_ASM_
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #include "com_dtypes.h"
  12. #ifndef _BOOL32_DEFINED
  13. typedef unsigned long int bool32;
  14. #define _BOOL32_DEFINED
  15. #endif
  16. #define HAL_ENUM_32BITS(x) HAL_##x##_FORCE32BITS = 0x7FFFFFFF
  17. #define inp(port) (*((volatile byte *) (port)))
  18. #define inpw(port) (*((volatile word *) (port)))
  19. #define inpdw(port) (*((volatile dword *)(port)))
  20. #define outp(port, val) (*((volatile byte *) (port)) = ((byte) (val)))
  21. #define outpw(port, val) (*((volatile word *) (port)) = ((word) (val)))
  22. #define outpdw(port, val) (*((volatile dword *) (port)) = ((dword) (val)))
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif
  27. #endif