Tim Ahrens

How to make extern?

Discussion created by Tim Ahrens on Mar 12, 2008
Latest reply on Mar 16, 2008 by Tim Ahrens
Hi Folks,
I have been using the following structure (I think Mac provided
something similar in a different thread). - Thanks Mac!!!
Anyhow, it works great while I am in the file where it is defined,
but I'm having a hard time figuring out what to make 'extern' in a
different file so I can call them by their bit numbers.
i.e.  if (time5_sound = 1)


typedef 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;  
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