00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AD6620_H
00023 #define AD6620_H
00024
00025 #include "global.h"
00026
00027
00028
00029
00030 #define AD6620_REFCLK_FREQ 50000000l
00031
00032
00033
00034
00035
00036 #define AD6620_REG_BASE 0x81000200
00037
00038
00039 #define AD6620_REG_DR0 0x00
00040 #define AD6620_REG_DR1 0x01
00041 #define AD6620_REG_DR2 0x02
00042 #define AD6620_REG_DR3 0x03
00043 #define AD6620_REG_DR4 0x04
00044 #define AD6620_REG_LAR 0x06
00045 #define AD6620_REG_AMR 0x07
00046
00047
00048 #define AD6620_REG_RCF_COEFF 0x000
00049 #define AD6620_REG_RCF_DATA 0x100
00050 #define AD6620_REG_MODE_CTRL 0x300
00051 #define AD6620_REG_NCO_CTRL 0x301
00052 #define AD6620_REG_NCO_SYNC 0x302
00053 #define AD6620_REG_NCO_FREQ 0x303
00054 #define AD6620_REG_NCO_PHASE 0x304
00055
00056 #define AD6620_REG_CIC2_SCALE 0x305
00057 #define AD6620_REG_CIC2_DECIM 0x306
00058
00059 #define AD6620_REG_CIC5_SCALE 0x307
00060 #define AD6620_REG_CIC5_DECIM 0x308
00061
00062 #define AD6620_REG_RCF_CTRL 0x309
00063 #define AD6620_REG_RCF_DECIM 0x30A
00064 #define AD6620_REG_RCFADDR_OFS 0x30B
00065 #define AD6620_REG_RCF_TAPS 0x30C
00066
00067 #define AD6620_REG_RESERVED 0x30D
00068
00069
00070 #define AD6620_NCO_BYPASS 0x01
00071 #define AD6620_NCO_PHASE_DITHER 0x02
00072 #define AD6620_NCO_AMPL_DITHER 0x04
00073
00074 void ad6620Init(void);
00075
00076 u32 ad6620ReadReg(u16 reg);
00077 void ad6620WriteReg(u16 reg, u32 data);
00078 void ad6620SetNCOMode(u08 mode);
00079 void ad6620SetNCOFreq(u32 freqHz);
00080 void ad6620SetNCOPhase(u16 phase);
00081 void ad6620LoadRCFilter(int start, int taps, s32* coeffs);
00082
00083 void ad6620ShowRegisters(void);
00084
00085
00086 #endif