Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
phy_calibration.c File Reference
#include "phy_calibration.h"
#include "wbhal.h"
#include "wb35reg_f.h"
#include "core.h"

Go to the source code of this file.

Macros

#define LOOP_TIMES   20
 
#define US   1000/* MICROSECOND*/
 
#define AG_CONST   0.6072529350
 
#define FIXED(X)   ((s32)((X) * 32768.0))
 
#define DEG2RAD(X)   (0.017453 * (X))
 
#define hw_get_dxx_reg(_A, _B, _C)   hal_get_dxx_reg(_A, _B, (u32 *)_C)
 
#define hw_set_dxx_reg(_A, _B, _C)   hal_set_dxx_reg(_A, _B, (u32)_C)
 

Functions

s32 _s13_to_s32 (u32 data)
 
u32 _s32_to_s13 (s32 data)
 
s32 _s4_to_s32 (u32 data)
 
u32 _s32_to_s4 (s32 data)
 
s32 _s5_to_s32 (u32 data)
 
u32 _s32_to_s5 (s32 data)
 
s32 _s6_to_s32 (u32 data)
 
u32 _s32_to_s6 (s32 data)
 
s32 _s9_to_s32 (u32 data)
 
u32 _s32_to_s9 (s32 data)
 
s32 _floor (s32 n)
 
u32 _sqrt (u32 sqsum)
 
void _sin_cos (s32 angle, s32 *sin, s32 *cos)
 
void _reset_rx_cal (struct hw_data *phw_data)
 
void _rxadc_dc_offset_cancellation_winbond (struct hw_data *phw_data, u32 frequency)
 
void _txidac_dc_offset_cancellation_winbond (struct hw_data *phw_data)
 
void _txqdac_dc_offset_cacellation_winbond (struct hw_data *phw_data)
 
u8 _tx_iq_calibration_loop_winbond (struct hw_data *phw_data, s32 a_2_threshold, s32 b_2_threshold)
 
void _tx_iq_calibration_winbond (struct hw_data *phw_data)
 
u8 _rx_iq_calibration_loop_winbond (struct hw_data *phw_data, u16 factor, u32 frequency)
 
void _rx_iq_calibration_winbond (struct hw_data *phw_data, u32 frequency)
 
void phy_calibration_winbond (struct hw_data *phw_data, u32 frequency)
 
void phy_set_rf_data (struct hw_data *pHwData, u32 index, u32 value)
 
unsigned char adjust_TXVGA_for_iq_mag (struct hw_data *phw_data)
 

Macro Definition Documentation

#define AG_CONST   0.6072529350

Definition at line 25 of file phy_calibration.c.

#define DEG2RAD (   X)    (0.017453 * (X))

Definition at line 27 of file phy_calibration.c.

#define FIXED (   X)    ((s32)((X) * 32768.0))

Definition at line 26 of file phy_calibration.c.

#define hw_get_dxx_reg (   _A,
  _B,
  _C 
)    hal_get_dxx_reg(_A, _B, (u32 *)_C)

Definition at line 305 of file phy_calibration.c.

#define hw_set_dxx_reg (   _A,
  _B,
  _C 
)    hal_set_dxx_reg(_A, _B, (u32)_C)

Definition at line 316 of file phy_calibration.c.

#define LOOP_TIMES   20

Definition at line 22 of file phy_calibration.c.

#define US   1000/* MICROSECOND*/

Definition at line 23 of file phy_calibration.c.

Function Documentation

s32 _floor ( s32  n)

Definition at line 180 of file phy_calibration.c.

void _reset_rx_cal ( struct hw_data phw_data)

Definition at line 319 of file phy_calibration.c.

u8 _rx_iq_calibration_loop_winbond ( struct hw_data phw_data,
u16  factor,
u32  frequency 
)

Definition at line 1104 of file phy_calibration.c.

void _rx_iq_calibration_winbond ( struct hw_data phw_data,
u32  frequency 
)

Definition at line 1374 of file phy_calibration.c.

void _rxadc_dc_offset_cancellation_winbond ( struct hw_data phw_data,
u32  frequency 
)

Definition at line 339 of file phy_calibration.c.

s32 _s13_to_s32 ( u32  data)

Definition at line 45 of file phy_calibration.c.

u32 _s32_to_s13 ( s32  data)

Definition at line 57 of file phy_calibration.c.

u32 _s32_to_s4 ( s32  data)

Definition at line 84 of file phy_calibration.c.

u32 _s32_to_s5 ( s32  data)

Definition at line 111 of file phy_calibration.c.

u32 _s32_to_s6 ( s32  data)

Definition at line 138 of file phy_calibration.c.

u32 _s32_to_s9 ( s32  data)

Definition at line 165 of file phy_calibration.c.

s32 _s4_to_s32 ( u32  data)

Definition at line 72 of file phy_calibration.c.

s32 _s5_to_s32 ( u32  data)

Definition at line 99 of file phy_calibration.c.

s32 _s6_to_s32 ( u32  data)

Definition at line 126 of file phy_calibration.c.

s32 _s9_to_s32 ( u32  data)

Definition at line 153 of file phy_calibration.c.

void _sin_cos ( s32  angle,
s32 sin,
s32 cos 
)

Definition at line 264 of file phy_calibration.c.

u32 _sqrt ( u32  sqsum)

Definition at line 196 of file phy_calibration.c.

u8 _tx_iq_calibration_loop_winbond ( struct hw_data phw_data,
s32  a_2_threshold,
s32  b_2_threshold 
)

Definition at line 675 of file phy_calibration.c.

void _tx_iq_calibration_winbond ( struct hw_data phw_data)

Definition at line 958 of file phy_calibration.c.

void _txidac_dc_offset_cancellation_winbond ( struct hw_data phw_data)

Definition at line 434 of file phy_calibration.c.

void _txqdac_dc_offset_cacellation_winbond ( struct hw_data phw_data)

Definition at line 559 of file phy_calibration.c.

unsigned char adjust_TXVGA_for_iq_mag ( struct hw_data phw_data)

Definition at line 1518 of file phy_calibration.c.

void phy_calibration_winbond ( struct hw_data phw_data,
u32  frequency 
)

Definition at line 1446 of file phy_calibration.c.

void phy_set_rf_data ( struct hw_data pHwData,
u32  index,
u32  value 
)

Definition at line 1477 of file phy_calibration.c.