Mercurial > hg > fxanalyse
view dds.h @ 255:ada536bc461b
Use 127.0.0.1 as example address in FXAnalyse.ini
Avoid any interference with real hardware during testing
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Fri, 05 Jun 2015 18:10:46 +0200 |
parents | fcc988c6f841 |
children | 5296f3bcd160 |
line wrap: on
line source
#ifndef __FXANALYSE_DDS_H__ #define __FXANALYSE_DDS_H__ #define usleep(t) Delay((t) / 1000000.0) #define strdup(s) StrDup(s) typedef long long int64; typedef unsigned long long uint64; static inline uint64 ftw(double clock, double freq) { uint64 ftw = freq * ((double)(1ULL << 48) / clock); return ftw; } static inline double freq(double clock, uint64 ftw) { double freq = (double)ftw * (clock / (double)(1ULL << 48)); return freq; } static inline int strtouint64(const char *str, uint64 *v) { char *end; *v = strtoull(str, &end, 0); if (*end != '\0') return -1; return 0; } int msend(int fd, char *buffer, int n); int mrecv(int fd, char *buffer, int len); int command(int fd, char *frmt, ...); #endif