I'm getting lots of "redeclared" error messages in my header files. What's wrong?

If you've authored your own device header file or other header file (e.g., for a library), check to see if it has standard C header protection in it.

The code looks like this:

#ifndef __HEADER_H
#define __HEADER_H 
/* Body of the header file. */ 
#endif /* __HEADER_H */

Replace HEADER_H with the filename of your header file, changing any periods for underscores.

These lines ensure that, no matter how many times a header file is #included, its declarations are only compiled once.