typedef unsigned char time_Sound; #define timeSound1 0x04 ... timeSound |= timeSound1;
If this is a copy from your sound.c file, the problem is time_TimeSTR is not the typedef name you declared in the header, it is time_SoundSTR. Also, the extern is defined as _time_Sound, time with a lower case t instead of the upper case you have used here.
UtopiaTim wrote:#include "sound.h"time_TimeSTR _Time_Sound;
In sound.h, I have specified that it should be on the 1st page, have I missed anything in that regard?
Thanks,
Tim
#ifndef TIME_SOUND_HEADER // These 2 lines are an include guard, to make sure this file#define TIME_SOUND_HEADER // is only included once in any one source filetypedef union { byte Byte; struct { byte NC1 :1; byte NC2 :1; byte time1Sound :1; byte time2Sound :1; byte time3Sound :1; byte time4Sound :1; byte time5Sound :1; byte time6Sound :1; } Bits;} time_SoundSTR; extern time_SoundSTR _time_Sound;#define time_Sound _time_Sound.Byte#define NC1 _time_Sound.Bits.NC1#define NC2 _time_Sound.Bits.NC2#define time1Sound _time_Sound.Bits.time1Sound#define time2Sound _time_Sound.Bits.time2Sound#define time3Sound _time_Sound.Bits.time3Sound#define time4Sound _time_Sound.Bits.time4Sound#define time5Sound _time_Sound.Bits.time5Sound#define time6Sound _time_Sound.Bits.time6Sound#endif // End of the include guard
Did you define the variables after include the header file in one C file? Usually that is the C file with the corresponding name, e.g.
/* sound.c */#include "sound.h"time_SoundSTR _time_Sound;