1 /******************************************************************************
3 * Copyright(c) 2015 - 2018 Realtek Corporation. All rights reserved.
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.
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
14 ******************************************************************************/
16 #ifndef _HALMAC_2_PLATFORM_H_
17 #define _HALMAC_2_PLATFORM_H_
19 /*[Driver] always set BUILD_TEST =0*/
23 #include "../Platform/App/Test/halmac_2_platformapi.h"
25 /*[Driver] use their own header files*/
26 #include <drv_conf.h> /* for basic_types.h and osdep_service.h */
27 #include <basic_types.h> /* u8, u16, u32 and etc.*/
28 #include <osdep_service.h> /* __BIG_ENDIAN, __LITTLE_ENDIAN, _sema, _mutex */
31 /*[Driver] provide the define of NULL, u8, u16, u32*/
33 #define NULL ((void *)0)
36 #define HALMAC_INLINE inline
39 * Ignore following typedef because Linux already have these
40 * u8, u16, u32, s8, s16, s32
41 * __le16, __le32, __be16, __be32
44 #define HALMAC_PLATFORM_LITTLE_ENDIAN 1
45 #define HALMAC_PLATFORM_BIG_ENDIAN 0
47 /* Note : Named HALMAC_PLATFORM_LITTLE_ENDIAN / HALMAC_PLATFORM_BIG_ENDIAN
48 * is not mandatory. But Little endian must be '1'. Big endian must be '0'
50 /*[Driver] config the system endian*/
51 #ifdef __LITTLE_ENDIAN
52 #define HALMAC_SYSTEM_ENDIAN HALMAC_PLATFORM_LITTLE_ENDIAN
53 #else /* !__LITTLE_ENDIAN */
54 #define HALMAC_SYSTEM_ENDIAN HALMAC_PLATFORM_BIG_ENDIAN
55 #endif /* !__LITTLE_ENDIAN */
57 /*[Driver] config if the operating platform*/
58 #define HALMAC_PLATFORM_WINDOWS 0
59 #define HALMAC_PLATFORM_LINUX 1
60 #define HALMAC_PLATFORM_AP 0
61 /*[Driver] must set HALMAC_PLATFORM_TESTPROGRAM = 0*/
62 #define HALMAC_PLATFORM_TESTPROGRAM 0
64 /*[Driver] config if enable the dbg msg or notl*/
65 #define HALMAC_DBG_MSG_ENABLE 1
67 #define HALMAC_MSG_LEVEL_TRACE 3
68 #define HALMAC_MSG_LEVEL_WARNING 2
69 #define HALMAC_MSG_LEVEL_ERR 1
70 #define HALMAC_MSG_LEVEL_NO_LOG 0
71 /*[Driver] config halmac msg level
72 * Use HALMAC_MSG_LEVEL_XXXX
74 #define HALMAC_MSG_LEVEL HALMAC_MSG_LEVEL_TRACE
76 /*[Driver] define the Rx FIFO expanding mode packet size unit for 8821C and 8822B */
77 /*Should be 8 Byte alignment*/
78 #define HALMAC_RX_FIFO_EXPANDING_MODE_PKT_SIZE 80 /*Bytes*/
80 #define HALMAC_USE_TYPEDEF 0
82 /*[Driver] provide the type mutex*/
84 typedef _mutex HALMAC_MUTEX;
86 #endif /* _HALMAC_2_PLATFORM_H_ */