1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 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 ******************************************************************************/
17 #ifndef __ODM_INTERFACE_H__
18 #define __ODM_INTERFACE_H__
22 /* =========== Constant/Structure/Enum/... Define */
24 /* =========== Macro Define */
26 #define _reg_all(_name) ODM_##_name
27 #define _reg_ic(_name, _ic) ODM_##_name##_ic
28 #define _bit_all(_name) BIT_##_name
29 #define _bit_ic(_name, _ic) BIT_##_name##_ic
31 /*===================================
33 #define ODM_REG_DIG_11N 0xC50
34 #define ODM_REG_DIG_11AC 0xDDD
36 ODM_REG(DIG, _pDM_Odm)
37 =====================================*/
39 #define _reg_11N(_name) ODM_REG_##_name##_11N
40 #define _bit_11N(_name) ODM_BIT_##_name##_11N
42 #define _cat(_name, _ic_type, _func) _func##_11N(_name)
44 /* _name: name of register or bit. */
45 /* Example: "ODM_REG(R_A_AGC_CORE1, pDM_Odm)" */
46 /* gets "ODM_R_A_AGC_CORE1" or "ODM_R_A_AGC_CORE1_8192C", depends on SupportICType. */
47 #define ODM_REG(_name, _pDM_Odm) _cat(_name, _pDM_Odm->SupportICType, _reg)
48 #define ODM_BIT(_name, _pDM_Odm) _cat(_name, _pDM_Odm->SupportICType, _bit)
50 typedef enum _ODM_H2C_CMD {
51 ODM_H2C_RSSI_REPORT = 0,
52 ODM_H2C_PSD_RESULT = 1,
54 ODM_H2C_WIFI_CALIBRATION = 3,
59 #endif /* __ODM_INTERFACE_H__ */