
#ifndef MISC_STUFF_H_
#define MISC_STUFF_H_

typedef unsigned char     	BYTE;       // 8 bits
typedef unsigned int		DOUBLET;    // 16 bits
typedef int					SDOUBLET;   // 16 bits with a sign
typedef unsigned long		QUADLET;    // 32 bits

union ddata
{
  DOUBLET   doublet;  
  BYTE          byte[2];
};
typedef union ddata DDATA;

union qdata
{
  float     float_num;      
  QUADLET   quadlet;
  DOUBLET   doublet[2]; 
  BYTE      byte[4];
};
typedef union qdata QDATA; 


// General Interrupt Enable bit, see Status Register (SR), bit 3, GIE
//#define SET_GIE _bis_SR_register( 0x0008 )	

// General Interrupt Enable bit, see Status Register (SR), bit 3, GIE
//#define CLR_GIE _bic_SR_register( 0x0008 )	


#define LED1_ENABLE		P1OUT |= 0x01		// set P1.0
#define LED1_DISABLE	P1OUT &= 0xFE		// clear P1.0	

#define SET_B0  0x01
#define SET_B1  0x02
#define SET_B2  0x04
#define SET_B3  0x08
#define SET_B4  0x10
#define SET_B5  0x20
#define SET_B6  0x40
#define SET_B7  0x80



#endif

