Go to the documentation of this file.
8 #ifndef IIO_DDS_AD9832_H_
9 #define IIO_DDS_AD9832_H_
13 #define AD9832_FREQ0LL 0x0
14 #define AD9832_FREQ0HL 0x1
15 #define AD9832_FREQ0LM 0x2
16 #define AD9832_FREQ0HM 0x3
17 #define AD9832_FREQ1LL 0x4
18 #define AD9832_FREQ1HL 0x5
19 #define AD9832_FREQ1LM 0x6
20 #define AD9832_FREQ1HM 0x7
21 #define AD9832_PHASE0L 0x8
22 #define AD9832_PHASE0H 0x9
23 #define AD9832_PHASE1L 0xA
24 #define AD9832_PHASE1H 0xB
25 #define AD9832_PHASE2L 0xC
26 #define AD9832_PHASE2H 0xD
27 #define AD9832_PHASE3L 0xE
28 #define AD9832_PHASE3H 0xF
30 #define AD9832_PHASE_SYM 0x10
31 #define AD9832_FREQ_SYM 0x11
32 #define AD9832_PINCTRL_EN 0x12
33 #define AD9832_OUTPUT_EN 0x13
37 #define AD9832_CMD_PHA8BITSW 0x1
38 #define AD9832_CMD_PHA16BITSW 0x0
39 #define AD9832_CMD_FRE8BITSW 0x3
40 #define AD9832_CMD_FRE16BITSW 0x2
41 #define AD9832_CMD_FPSELECT 0x6
42 #define AD9832_CMD_SYNCSELSRC 0x8
43 #define AD9832_CMD_SLEEPRESCLR 0xC
45 #define AD9832_FREQ (1 << 11)
46 #define AD9832_PHASE(x) (((x) & 3) << 9)
47 #define AD9832_SYNC (1 << 13)
48 #define AD9832_SELSRC (1 << 12)
49 #define AD9832_SLEEP (1 << 13)
50 #define AD9832_RESET (1 << 12)
51 #define AD9832_CLR (1 << 11)
54 #define AD9832_FREQ_BITS 32
55 #define AD9832_PHASE_BITS 12
56 #define RES_MASK(bits) ((1 << (bits)) - 1)