| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #include "ad9912.h"
- const uint32_t ad9912regs[AD9912_COUNT] = {
- 0x000018,
- 0x000100,
- 0x000202,
- 0x000309,
- 0x000400,
- 0x000500,
- 0x001010,
- 0x001200,
- 0x001300,
- 0x002012,
- 0x002204,
- 0x010400,
- 0x010500,
- 0x010600,
- 0x01A633,
- 0x01A733,
- 0x01A833,
- 0x01A933,
- 0x01AA33,
- 0x01AB33,
- 0x01AC00,
- 0x01AD00,
- 0x020005,
- 0x020100,
- 0x040BFF,
- 0x040C01,
- 0x040E10,
- 0x050000,
- 0x050100,
- 0x050200,
- 0x050300,
- 0x050400,
- 0x050500,
- 0x050600,
- 0x050700,
- 0x050800,
- 0x050900
- };
- /*-------------------------AD9912 INIT FUNCTION-------------------------*/
- void ad9912_init(void *bar1) {
- uint32_t *ptr_rst = bar1 + AD9912_BASE_ADDR;
- *ptr_rst = GPIO_INIT_HEADER;
- //Rst on
- *ptr_rst = AD9912_RST_ON;
- // Rst off
- *ptr_rst = GPIO_REG;
- //Init Header
- uint32_t *ptr = bar1 + AD9912_BASE_ADDR;
- *ptr = InitDDSHeader;
- //Init Data
- for (int k = 0; k < AD9912_COUNT; k++) {
- uint32_t *ptr = bar1 + AD9912_BASE_ADDR;
- *ptr = ad9912regs[k];
- }
- }
- /*----------------------------------------------------------------------*/
|