static void kaiser(int nf, float *w, int n, int ieo, double beta) { /* nf = filter length in samples w = window array of size n n = filter half length=(nf+1)/2 ieo = even odd indicator--ieo=0 if nf even beta = parameter of kaiser window */ double bes, xind, xi; int i; bes = ino(beta); xind = (double) ((nf - 1) * (nf - 1)); for (i = 0; i < n; i++) { xi = (double) i; if (ieo == 0) xi += 0.5; xi = 4.0 * xi * xi; xi = sqrt(1.0 - (double) (xi / xind)); w[i] = (float) (ino(beta * xi) / bes); } }
/* Kaiser Window (symetric) */ static void kaiser(float *w,int n,float beta) { float xind, xi; int i; xind = (2*n - 1) * (2*n - 1); for (i =0; i<n ; i++) { xi = i + 0.5; w[i] = ino((float)(beta * sqrt((double)(1. - 4 * xi * xi / xind)))) / ino((float)beta); } }
void detachInterruptX(int x,int ir) { ino(x); detachInterrupt(ir); return; }
void attachInterruptX(int x,int ir,void(*func)(),int mode) { ino(x); attachInterrupt(ir,func,mode); return; }
void serial::writeX(int z,char *p) { ino(z); println(p); return; }
void serial::printlnX(int z) { ino(z); println(); return; }
void serial::printlnX(int z, String s) { ino(z); println(s); return; }
void serial::printlnX(int z,const char *p) { ino(z); println(p); return; }
void serial::printlnX(int z,int x) { ino(z); println(x); return; }
void serial::printX(int z,int x, int base) { ino(z); print(x,base); return; }
void serial::flushX(int z) { ino(z); flush(); }
int serial::peekX(int z) { ino(z); return(peek()); }
int serial::availableX(int z) { ino(z); return(available()); }
void serial::endX(int z) { ino(z); end(); return; }
void serial::beginX(int z,int baudRate) { ino(z); begin(baudRate); return; }