main.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00025 #define OP_MODE_FULL 0
00026 #define OP_MODE_STDBY 1
00027 #define OP_MODE_SLEEP 2
00028 
00029 #ifdef MODULE_MAIN
00030   unsigned char action_flags = 0;
00031   unsigned char OperatingMode = OP_MODE_FULL;
00032 #else
00033   extern unsigned char action_flags;
00034   extern unsigned char OperatingMode;
00035 #endif
00036 
00037 
00038 #define QTRSECFLAG     1
00039 #define ADCDONEFLAG    2
00040 #define ALARMMODEFLAG  4
00041 #define MASTERSMBDONE  8
00042 #define CALIBREQUESTED 16
00043 
00044 
00045 #define CheckADCScanDone  (action_flags & ADCDONEFLAG)
00046 #define SetADCScanDone    {action_flags |= ADCDONEFLAG;}
00047 #define ClrADCScanDone    {action_flags &= ~ADCDONEFLAG;}
00048 
00049 #define CheckQtrSec       (action_flags &  QTRSECFLAG)
00050 #define SetQtrSec         {action_flags |= QTRSECFLAG;}
00051 #define ClrQtrSec         {action_flags &= ~QTRSECFLAG;}
00052 
00053 #define CheckAlarmMode    (action_flags &  ALARMMODEFLAG)
00054 #define SetAlarmMode      {action_flags |= ALARMMODEFLAG;}
00055 #define ClrAlarmMode      {action_flags &= ~ALARMMODEFLAG;}
00056 
00057 #define CheckMasterSMBdone (action_flags & MASTERSMBDONE)
00058 #define SetMasterSMBdone   {action_flags |= MASTERSMBDONE;}
00059 #define ClrMasterSMBdone   {action_flags &= ~MASTERSMBDONE;}
00060 
00061 #define CheckCalibRequest (action_flags & CALIBREQUESTED)
00062 #define SetCalibRequest   {action_flags |= CALIBREQUESTED;}
00063 #define ClrCalibRequest   {action_flags &= ~CALIBREQUESTED;}
00064 

Generated on Mon Nov 12 15:59:58 2007 for AVR453 Smart Battery Reference Design by  doxygen 1.5.3