Pekka Enberg | 80aba53 | 2008-10-30 13:04:29 +0200 | [diff] [blame] | 1 | #ifndef __WINBOND_WB35REG_F_H |
| 2 | #define __WINBOND_WB35REG_F_H |
| 3 | |
Pekka Enberg | 9ce922f | 2008-10-30 13:05:42 +0200 | [diff] [blame] | 4 | #include "wbhal_s.h" |
Pekka Enberg | 80aba53 | 2008-10-30 13:04:29 +0200 | [diff] [blame] | 5 | |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 6 | //==================================== |
| 7 | // Interface function declare |
| 8 | //==================================== |
Pekka Enberg | 8e41b4b | 2009-01-12 18:02:47 +0200 | [diff] [blame] | 9 | unsigned char Wb35Reg_initial( struct hw_data * pHwData ); |
| 10 | void Uxx_power_on_procedure( struct hw_data * pHwData ); |
| 11 | void Uxx_power_off_procedure( struct hw_data * pHwData ); |
| 12 | void Uxx_ReadEthernetAddress( struct hw_data * pHwData ); |
| 13 | void Dxx_initial( struct hw_data * pHwData ); |
| 14 | void Mxx_initial( struct hw_data * pHwData ); |
| 15 | void RFSynthesizer_initial( struct hw_data * pHwData ); |
| 16 | //void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, s8 Channel ); |
| 17 | void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, ChanInfo Channel ); |
| 18 | void BBProcessor_initial( struct hw_data * pHwData ); |
| 19 | void BBProcessor_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060613.1 |
| 20 | //void RF_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060626.5.c Add |
| 21 | u8 RFSynthesizer_SetPowerIndex( struct hw_data * pHwData, u8 PowerIndex ); |
| 22 | u8 RFSynthesizer_SetMaxim2828_24Power( struct hw_data *, u8 index ); |
| 23 | u8 RFSynthesizer_SetMaxim2828_50Power( struct hw_data *, u8 index ); |
| 24 | u8 RFSynthesizer_SetMaxim2827_24Power( struct hw_data *, u8 index ); |
| 25 | u8 RFSynthesizer_SetMaxim2827_50Power( struct hw_data *, u8 index ); |
| 26 | u8 RFSynthesizer_SetMaxim2825Power( struct hw_data *, u8 index ); |
| 27 | u8 RFSynthesizer_SetAiroha2230Power( struct hw_data *, u8 index ); |
| 28 | u8 RFSynthesizer_SetAiroha7230Power( struct hw_data *, u8 index ); |
| 29 | u8 RFSynthesizer_SetWinbond242Power( struct hw_data *, u8 index ); |
| 30 | void GetTxVgaFromEEPROM( struct hw_data * pHwData ); |
| 31 | void EEPROMTxVgaAdjust( struct hw_data * pHwData ); // 20060619.5 Add |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 32 | |
| 33 | #define RFWriteControlData( _A, _V ) Wb35Reg_Write( _A, 0x0864, _V ) |
| 34 | |
Pekka Enberg | 8e41b4b | 2009-01-12 18:02:47 +0200 | [diff] [blame] | 35 | void Wb35Reg_destroy( struct hw_data * pHwData ); |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 36 | |
Pekka Enberg | 8e41b4b | 2009-01-12 18:02:47 +0200 | [diff] [blame] | 37 | unsigned char Wb35Reg_Read( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ); |
| 38 | unsigned char Wb35Reg_ReadSync( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ); |
| 39 | unsigned char Wb35Reg_Write( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); |
| 40 | unsigned char Wb35Reg_WriteSync( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); |
| 41 | unsigned char Wb35Reg_WriteWithCallbackValue( struct hw_data * pHwData, |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 42 | u16 RegisterNo, |
| 43 | u32 RegisterValue, |
Pekka Enberg | 8b384e0 | 2008-10-21 00:03:41 +0300 | [diff] [blame] | 44 | s8 *pValue, |
| 45 | s8 Len); |
Pekka Enberg | 8e41b4b | 2009-01-12 18:02:47 +0200 | [diff] [blame] | 46 | unsigned char Wb35Reg_BurstWrite( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterData, u8 NumberOfData, u8 Flag ); |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 47 | |
Pekka Enberg | 8e41b4b | 2009-01-12 18:02:47 +0200 | [diff] [blame] | 48 | void Wb35Reg_EP0VM( struct hw_data * pHwData ); |
| 49 | void Wb35Reg_EP0VM_start( struct hw_data * pHwData ); |
Pekka Enberg | a55a89b | 2008-10-22 11:01:16 +0300 | [diff] [blame] | 50 | void Wb35Reg_EP0VM_complete(struct urb *urb); |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 51 | |
| 52 | u32 BitReverse( u32 dwData, u32 DataLength); |
| 53 | |
| 54 | void CardGetMulticastBit( u8 Address[MAC_ADDR_LENGTH], u8 *Byte, u8 *Value ); |
Pekka Enberg | 8b384e0 | 2008-10-21 00:03:41 +0300 | [diff] [blame] | 55 | u32 CardComputeCrc( u8 * Buffer, u32 Length ); |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 56 | |
Pekka Enberg | 8e41b4b | 2009-01-12 18:02:47 +0200 | [diff] [blame] | 57 | void Wb35Reg_phy_calibration( struct hw_data * pHwData ); |
| 58 | void Wb35Reg_Update( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); |
| 59 | unsigned char adjust_TXVGA_for_iq_mag( struct hw_data * pHwData ); |
Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame] | 60 | |
Pekka Enberg | 80aba53 | 2008-10-30 13:04:29 +0200 | [diff] [blame] | 61 | #endif |