void ISR_AIC() { wave=mono_read_16Bit(); if(wave>0){ wave=-wave; } mono_write_16Bit(wave); }
void ISR_AIC() { int i; for(i=N-1;i>0;i--){ //loop through every element from last to first x[i]=x[i-1]; //shift all element to right and abandon the last one } x[0]=mono_read_16Bit(); //store input non_circ_FIR(); }
void direct_form_2_transposed() { int i; double xin; xin=(double)mono_read_16Bit();//read input buf[0]=b[0]*xin+buf[1];//generate output for(i=1;i<N;i++){ buf[i]=xin*b[i]-buf[0]*a[i]+buf[i+1]; } buf[N]=xin*b[N]-buf[0]*a[N];//perform MAC on the last buffer mono_write_16Bit((short)buf[0]); }
void ISR_AIC() { int i; y=0; root->n=mono_read_16Bit(); for(i=N;i>0;i--){ root=root->next; y+=(root->n)*coefs[i-1]; } root=root->next; mono_write_16Bit((short)y); }
void direct_form_2() { int i; double yout=0; buf[0]=(double)mono_read_16Bit(); //read input for(i=N;i>0;i--){ //perform filter buf[0]-=buf[i]*a[i]; yout+=buf[i]*b[i]; buf[i]=buf[i-1]; } yout+=buf[0]*b[0]; mono_write_16Bit((short)yout);//output filter result }
void ISR_AIC(void) { short sample; /* Read and write the ADC and DAC using inbuffer and outbuffer */ sample = mono_read_16Bit(); inbuffer[io_ptr] = ((float)sample)*ingain; /* write new output data */ mono_write_16Bit((int)(outbuffer[io_ptr]*outgain)); /* update io_ptr and check for buffer wraparound */ if (++io_ptr >= CIRCBUF) io_ptr=0; }
void ISR_AIC(void) { short sample; float scale = 11585; sample = mono_read_16Bit(); /* add new data to input buffer and scale so that 1v ~= 1.0 */ input[index] = ((float)sample)/scale; /* write new output data */ mono_write_16Bit((short)(output[index]*scale)); /* update index and check for full buffer */ if (++index == BUFFLEN) index=0; }
void ISR_AIC(void){ double output = IIRFilter(mono_read_16Bit()); mono_write_16Bit((Int16) output); }
void ISR_AIC(void){ double sample = 0, output = 0; sample = mono_read_16Bit(); // read circ_FIR_DP(&X_PTR, b, &sample, &output, N); mono_write_16Bit((Int16) output); }
void ISR_AIC() { mono_write_16Bit(mono_read_16Bit()); }