2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-13 05:36:37 +08:00
artiq/soc/runtime/dds.h

28 lines
643 B
C
Raw Normal View History

2014-08-28 16:56:48 +08:00
#ifndef __DDS_H
#define __DDS_H
#include <hw/common.h>
#include <generated/mem.h>
#define DDS_READ(addr) \
MMPTR(DDS_BASE + (addr)*4)
#define DDS_WRITE(addr, data) \
MMPTR(DDS_BASE + (addr)*4) = data
#define DDS_FTW0 0x0a
#define DDS_FTW1 0x0b
#define DDS_FTW2 0x0c
#define DDS_FTW3 0x0d
#define DDS_POW0 0x0e
#define DDS_POW1 0x0f
#define DDS_GPIO 0x41
2014-08-28 16:56:48 +08:00
void dds_init(void);
2014-11-21 04:32:56 +08:00
void dds_phase_clear_en(int channel, int phase_clear_en);
void dds_program(long long int timestamp, int channel,
2014-12-09 13:50:33 +08:00
unsigned int ftw, unsigned int pow, unsigned int sysclk_per_microcycle,
2014-11-21 04:32:56 +08:00
int rt_fud, int phase_tracking);
2014-08-28 16:56:48 +08:00
#endif /* __DDS_H */