Quote:
|
Originally Posted by Idaman323
would that work, and would the top part go into adc.h or adc.c?
|
You should place the sensor declaration whereever you are going to be using it. If it needs to be in multiple places, put an extern declaration in a header file which you then include in the extra files. IE:
externDeclartion.h (or whatever you want to call it)
Code:
extern unsigned int sensor1;
someFile.c
Code:
#include "externDeclaration.h"
...
--EDIT--
And yeah, you have the idea.