statefunc.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00028 #ifndef STATEFUNC_H
00029 #define STATEFUNC_H
00030 
00031 
00032 //******************************************************************************
00033 // Wanted SPI-mode
00034 //******************************************************************************
00036 #define SPIMODE 0
00037 
00039 //#define SPIMODE 1    
00040 
00041 
00042 //******************************************************************************
00043 // Typical and maximum voltage difference between supply and battery
00044 //******************************************************************************
00046 #define VIN_VBAT_DIFF_TYP     600
00047 
00049 #define VIN_VBAT_DIFF_MAX     500
00050 
00051 
00052 //******************************************************************************
00053 // Error-flag bit identifiers
00054 //******************************************************************************
00056 #define   ERR_JUMPER_MISMATCH                           0x01  
00057 
00059 #define   ERR_NO_BATTERIES_ENABLED              0x02  
00060 
00062 #define   ERR_PWM_CONTROL                                       0x04  
00063 
00065 #define   ERR_BATTERY_TEMPERATURE               0x08  
00066 
00068 #define   ERR_BATTERY_EXHAUSTED                 0x10  
00069 
00070 
00071 //******************************************************************************
00072 // Function prototypes
00073 //******************************************************************************
00074 unsigned char Initialize(unsigned char);
00075 unsigned char BatteryControl(unsigned char);
00076 unsigned char Discharge(unsigned char);
00077 unsigned char Sleep(unsigned char);
00078 void Doze(void);
00079 unsigned char Error(unsigned char);
00080 void SetErrorFlag(unsigned char);
00081 unsigned char JumperCheck(void);
00082 
00083 #endif // STATEFUNC_H

Generated on Tue Sep 4 19:17:55 2007 for AVR463 Charging NiMH Batteries with ATAVRBC100 by  doxygen 1.5.2