- Main Page
- Related Pages
- Data Structures
- Files

# structs.h

Go to the documentation of this file.

    00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
    00031 #ifndef STRUCTS_H
    00032 #define STRUCTS_H
    00033
    00034 //******************************************************************************
    00035 // Battery struct declarations
    00036 //******************************************************************************
    00042 struct Batteries_struct
    00043 {
    00044         unsigned char Present   : 1;
    00045         unsigned char Charged   : 1;
    00046         unsigned char Low       : 1;
    00047         unsigned char Exhausted : 1;
    00048         unsigned char HasRID            : 1;
    00049         unsigned char Circuit;
    00050         signed char Temperature;
    00051         unsigned char ADCSteps;
    00052         unsigned int  Capacity;
    00053         unsigned int  MaxCurrent;
    00054         unsigned int  MaxTime;
    00055         unsigned int  MinCurrent;
    00056 };
    00057 typedef struct Batteries_struct Batteries_t;
    00058
    00059
    00061 struct Battery_struct
    00062 {
    00064         unsigned char Enabled           : 1;
    00065
    00067         unsigned char DisconnectAllowed : 1;
    00068
    00070         unsigned char ChargeInhibit     : 1;
    00071 };
    00072 typedef struct Battery_struct Battery_t;
    00073
    00074
    00075 //******************************************************************************
    00076 // ADC status struct declaration
    00077 //******************************************************************************
    00082 struct ADC_Status_struct
    00083 {
    00084         unsigned char MUX : 5;
    00085         unsigned char Flag : 1;
    00086         unsigned char Mains : 1;
    00087         unsigned char Halt : 1;
    00088         unsigned char ADC3_G20_OS : 4;
    00089         unsigned char ADC5_G20_OS : 4;
    00090         unsigned int rawRID;
    00091         unsigned int rawNTC;
    00092         unsigned int rawVBAT;
    00093         unsigned int VIN;
    00094         unsigned int VBAT;
    00095         signed int IBAT;
    00096         signed int discIBAT[4];
    00097         signed int avgIBAT;
    00098 };
    00099 typedef struct ADC_Status_struct ADC_Status_t;
    00100
    00101
    00102 //******************************************************************************
    00103 // Parameter struct for charging
    00104 //******************************************************************************
    00108 struct ChargeParameters_struct {
    00109         unsigned int Voltage;
    00110         unsigned int Current;
    00111         unsigned char NextState;
    00112
    00113
    00114 };
    00115 typedef struct ChargeParameters_struct ChargeParameters_t;
    00116
    00117
    00118 //******************************************************************************
    00119 // Parameter struct for HaltNow()
    00120 //******************************************************************************
    00124 struct HaltParameters_struct {
    00127         unsigned char HaltFlags;
    00128
    00130         unsigned int VoltageDrop;
    00131
    00133         unsigned int VoltageMax;
    00134
    00136         unsigned int CurrentMin;
    00137
    00139         signed int TemperatureMax;
    00140
    00142         signed int TemperatureMin;
    00143
    00145         unsigned int TemperatureRise;
    00146
    00149         unsigned int VBATMax;
    00150
    00152         unsigned int LastNTC;
    00153 };
    00154 typedef struct HaltParameters_struct HaltParameters_t;
    00155
    00156
    00157 #endif // STRUCTS_H