halmac_2_platform.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2015 - 2016 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef _HALMAC_2_PLATFORM_H_
  21. #define _HALMAC_2_PLATFORM_H_
  22. /*[Driver] always set BUILD_TEST =0*/
  23. #define BUILD_TEST 0
  24. #if BUILD_TEST
  25. #include "../Platform/App/Test/halmac_2_platformapi.h"
  26. #else
  27. /*[Driver] use their own header files*/
  28. #include <drv_conf.h> /* for basic_types.h and osdep_service.h */
  29. #include <basic_types.h> /* u8, u16, u32 and etc.*/
  30. #include <osdep_service.h> /* __BIG_ENDIAN, __LITTLE_ENDIAN, _sema, _mutex */
  31. #endif
  32. /*[Driver] provide the define of _TRUE, _FALSE, NULL, u8, u16, u32*/
  33. #ifndef NULL
  34. #define NULL ((void *)0)
  35. #endif
  36. #define HALMAC_INLINE inline
  37. typedef u8 *pu8;
  38. typedef u16 *pu16;
  39. typedef u32 *pu32;
  40. typedef s8 *ps8;
  41. typedef s16 *ps16;
  42. typedef s32 *ps32;
  43. #define HALMAC_PLATFORM_LITTLE_ENDIAN 1
  44. #define HALMAC_PLATFORM_BIG_ENDIAN 0
  45. /* Note : Named HALMAC_PLATFORM_LITTLE_ENDIAN / HALMAC_PLATFORM_BIG_ENDIAN
  46. * is not mandatory. But Little endian must be '1'. Big endian must be '0'
  47. */
  48. /*[Driver] config the system endian*/
  49. #ifdef __LITTLE_ENDIAN
  50. #define HALMAC_SYSTEM_ENDIAN HALMAC_PLATFORM_LITTLE_ENDIAN
  51. #else /* !__LITTLE_ENDIAN */
  52. #define HALMAC_SYSTEM_ENDIAN HALMAC_PLATFORM_BIG_ENDIAN
  53. #endif /* !__LITTLE_ENDIAN */
  54. /*[Driver] config if the operating platform*/
  55. #define HALMAC_PLATFORM_WINDOWS 0
  56. #define HALMAC_PLATFORM_LINUX 1
  57. #define HALMAC_PLATFORM_AP 0
  58. /*[Driver] must set HALMAC_PLATFORM_TESTPROGRAM = 0*/
  59. #define HALMAC_PLATFORM_TESTPROGRAM 0
  60. /*[Driver] config if enable the dbg msg or notl*/
  61. #define HALMAC_DBG_MSG_ENABLE 1
  62. /*[Driver] define the Rx FIFO expanding mode packet size unit for 8821C and 8822B */
  63. /*Should be 8 Byte alignment*/
  64. #define HALMAC_RX_FIFO_EXPANDING_MODE_PKT_SIZE 48 /*Bytes*/
  65. /*[Driver] provide the type mutex*/
  66. /* Mutex type */
  67. typedef _mutex HALMAC_MUTEX;
  68. #endif /* _HALMAC_2_PLATFORM_H_ */