chargefunc.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00029 #ifndef CHARGEFUNC_H
00030 #define CHARGEFUNC_H
00031 
00032 
00033 //******************************************************************************
00034 // PWM error handling
00035 //******************************************************************************
00037 #define ABORT_IF_PWM_MAX
00038 
00040 #define ABORT_IF_PWM_MIN
00041 
00042 
00043 //******************************************************************************
00044 // Definitions for HaltFlags
00045 //******************************************************************************
00047 #define HALT_VOLTAGE_DROP               0x01  
00048 
00050 #define HALT_VOLTAGE_MAX                0x02  
00051 
00053 #define HALT_CURRENT_MIN                0x04  
00054 
00056 #define HALT_TEMPERATURE_RISE   0x08
00057 
00059 #define HALT_TIME                                       0x10  
00060 
00062 #define HALT_FLAG_EXHAUSTION    0x20
00063 
00064 
00065 //******************************************************************************
00066 // Parameter struct for charging
00067 //******************************************************************************
00071 struct ChargeParameters_struct {
00072         unsigned int Voltage;  
00073         unsigned int Current;  
00074         unsigned char NextState;  
00075 
00076 
00077 };
00078 typedef struct ChargeParameters_struct ChargeParameters_t;
00079 
00080 
00081 //******************************************************************************
00082 // Parameter struct for HaltNow()
00083 //******************************************************************************
00087 struct HaltParameters_struct {
00090         unsigned char HaltFlags;
00091         
00093         unsigned int VoltageDrop;  
00094         
00096         unsigned int VoltageMax;  
00097         
00099         unsigned int CurrentMin;
00100         
00102         unsigned int TemperatureMax;
00103         
00105         signed int TemperatureMin;
00106 
00108         unsigned int TemperatureRise;
00109 
00112         unsigned int VBATMax;
00113 
00115         unsigned int LastNTC;  
00116 };
00117 typedef struct HaltParameters_struct HaltParameters_t;
00118 
00119 
00120 //******************************************************************************
00121 // Global variables
00122 //******************************************************************************
00123 extern ChargeParameters_t ChargeParameters;
00124 extern HaltParameters_t HaltParameters;
00125 
00126 
00127 //******************************************************************************
00128 // Function prototypes
00129 //******************************************************************************
00130 unsigned char ConstantCurrent(void);
00131 unsigned char ConstantVoltage(void);
00132 unsigned char HaltNow(void);
00133 
00134 #endif // CHARGEFUNC_H

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