Demodulation of a BFSK frequency hopping signal using FFT I am not very familiar with DSP techniques, and I am currently working on my research project to develop the firmware of a DSP processor, using C/Linux. It involves the modulation and demodulation of a dataset using Binary FSK and frequency hopping Tx and Rx algorithms. I am able to modulate the signals and have verified the output using MATLAB. However I an a little stuck at demodulation.

The technique that I am using for demodulation is to compare the amplitude of the FFT of the signal received at every hopping sequence and based on that, determine whether the bit received is 1 or 0. I have a predefined function which is used calculate the FFT of the signals. The function is as follows: 

void fft(complex_float* in, complex_float* out, int N, int inv)
{
int i, j;
float a, f;
complex_float s, w;
f = inv ? 1.0/N : 1.0;
for (i = 0; i &lt; N; i++) {
s.re = 0;
s.im = 0;
for (j = 0; j &lt; N; j++) {
  a = -2*PI*i*j/N;
  if (inv) a = -a;
  w.re = cos(a);
  w.im = sin(a);
  s.re += in[j].re * w.re - in[j].im * w.im;
  s.im += in[j].im * w.re + in[j].re * w.im;
}
out[i].re = s.re*f;
out[i].im = s.im*f;
}
}


complex_float is a predefined struct :

typedef struct {
float re;
float im;
}complex_float;


In the function fft() N defines the number of FFT points. 

The problem that I am facing is how to determine the frequency points of the individual elements in the array returned by fft() function. In MATLAB, this was very easy to do the FFT function in MATLAB took the sampling frequency in account and plotted the power spectrum accordingly. However, In the fft() function defined above there is no frequency involved and hence I am confused as to how to find the power of the signal at any particular frequency, or how to determine the frequency point of any element of the retuned array.
At some point, before the fft() function is called, the sampling frequency must be known (from ADC? or other resampling functions?)... use that to find the frequencies of the bins as you would in Matlab.