I've made 3 files to organize my code. A main.c, a functions.h and a functions.c. I've also made a structure to use with some functions, and I'm having the problem that I can't find any way to declare the functions that use the structures in the .h file. The only way it works is when I put the functions in the .c with the structures without declaring any of them in the .h.
I tried this
in the main just:
#include "functions.c"
and in the .c:
#include "functions.h"
void myfunction(sinWave *sw, float u, float ts){
};
typedef struct{
float amplitude;
float fase;
} sinWave;
in the .h:
typedef struct sinWave;
void myfunction(sinWave *, float, float);
But it does not work. I get:
warning: useless storage class specifier in empty declaration
'typedef struct sinWave;'a
unknown type name 'sinWave'
'void ePLL(sinWave , float , float);'