heat control  r71
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
setup.c File Reference
#include "types.h"
#include "setup.h"
#include "hc.h"
#include "lcdisp.h"
#include "lcd_lib.h"
#include "timer.h"
#include "comm.h"
Include dependency graph for setup.c:

Go to the source code of this file.

Functions

void SetupInit (void)
 setup initialization at startup More...
 
UINTGetSetupValues (UCHAR fromEep)
 get payload values from specified memory location More...
 
void SetSetupValues (UINT *sv)
 update payload values in from ram to eeprom More...
 
void DoSetup (BTN_CODE bc, OP_MODE *opm)
 does the setup job, distinguishes data selection and modification dependent on user pressed buttons and current operation mode More...
 
void PrintPage (UCHAR id)
 takes care of visualization on screen, flashes the selected setup value, identifies selected item and its assigned page number More...
 
void TestButton (BTN_CODE bc)
 testing diferent button codes by screen visualization (inactive) More...
 

Variables

MEASSET EEMEM ge_msRec [NUM_MSR]
 
SETUP_ITEM EEMEM ge_setups [NUM_SETUPS]
 
UINT g_setVals [NUM_SETUPS]
 

Function Documentation

void DoSetup ( BTN_CODE  bc,
OP_MODE opm 
)

does the setup job, distinguishes data selection and modification dependent on user pressed buttons and current operation mode

Parameters
bcbutton code
opmoperation mode

Definition at line 86 of file setup.c.

References BC_DN, BC_DNUP, BC_DNUP_L, BC_UP, DIR_DOWN, DIR_UP, DT_UCHAR, g_setVals, ge_setups, SETUP_ITEM::group, LCDclr(), SETUP_ITEM::max, SETUP_ITEM::min, NUM_SETUPS, OM_SETUP, OM_TMPCTRL, OP_MODES, PrintPage(), SetLimitValue(), SetSetupValues(), SETUP_ITEM::type, UCHAR, and WriteSetupGroup().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT* GetSetupValues ( UCHAR  fromEep)

get payload values from specified memory location

Parameters
fromEeptrue -> values are being read from eeprom, from RAM otherwise
Returns
payload only values

Definition at line 59 of file setup.c.

References g_setVals, ge_setups, NUM_SETUPS, UCHAR, and SETUP_ITEM::value.

Referenced by SetupInit().

Here is the caller graph for this function:

void PrintPage ( UCHAR  id)

takes care of visualization on screen, flashes the selected setup value, identifies selected item and its assigned page number

Parameters
idindex of the current item in eeprom and payload value in ram

Definition at line 124 of file setup.c.

References g_setVals, ge_setups, GetTenthSec(), NUM_SETUPS, SZ_SETUP_ITEM, TRUE, UCHAR, SETUP_ITEM::value, and WriteSetupValue().

Referenced by DoSetup().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetSetupValues ( UINT sv)

update payload values in from ram to eeprom

Parameters
svlist of payload values

Definition at line 73 of file setup.c.

References ge_setups, NUM_SETUPS, UCHAR, and SETUP_ITEM::value.

Referenced by DoSetup().

Here is the caller graph for this function:

void SetupInit ( void  )

setup initialization at startup

Definition at line 50 of file setup.c.

References GetSetupValues(), and TRUE.

Referenced by Init().

Here is the call graph for this function:

Here is the caller graph for this function:

void TestButton ( BTN_CODE  bc)

testing diferent button codes by screen visualization (inactive)

Parameters
bcbutton code

Definition at line 155 of file setup.c.

References BC_DN, BC_DNUP, BC_DNUP_L, BC_UP, LCDGotoXY(), LCDstring(), and UCHAR.

Here is the call graph for this function:

Variable Documentation

UINT g_setVals[NUM_SETUPS]

effective (payload) data of each setup item in RAM

global setup values (payload only) for modification at runtime

Definition at line 103 of file setup.h.

Referenced by DoSetup(), GetSetupValues(), and PrintPage().

MEASSET EEMEM ge_msRec[NUM_MSR]

recording current temperature values to get a clue 5 hrs interval * 12 sets = 60 hrs period

Definition at line 20 of file setup.c.

Referenced by main().

SETUP_ITEM EEMEM ge_setups[NUM_SETUPS]
Initial value:
= {
{"OIT", -32600, 32600, OFF_IN_TEMP, DT_INT, SG_MEAS},
{"ARV", 4500, 5500, ADC_REF_VOLTAGE, DT_UINT, SG_MEAS},
{"RCV", 10, 150, REV_CURRENT_VALUE, DT_UCHAR, SG_MEAS},
{"RRF", 5000, 65400, RR_IN, DT_UINT, SG_MEAS},
{"SMI", 1, 59, IV_SHOW, DT_UCHAR, SG_MEAS},
{"SDT", 5000, 32600, OUT_TMP_SHDN_TH, DT_INT, SG_CTRL},
{"SDD", 1, 10, SHTDN_DUR, DT_UCHAR, SG_CTRL},
{"ECD", 1, 255, ENG_CTRL_DUR, DT_UCHAR, SG_CTRL},
{"HCI", 1, 255, IV_HCREC, DT_UCHAR, SG_CTRL},
{"IVM", 1, 255, IV_MEAS, DT_UCHAR, SG_CTRL},
{"DET", 0, 10500, DELTA_TEMP, DT_UINT, SG_CTRL},
{"TAR", 10, 255, 120, DT_UCHAR, SG_CTRL}
}
#define IV_MEAS
Definition: types.h:228
#define RR_IN
Definition: init.h:34
#define MAX_ABS_INNER_TEMP
Definition: comm.h:70
#define ADC_REF_VOLTAGE
Definition: init.h:42
#define OFF_IN_TEMP
Definition: hc.h:105
#define NOM_IN_TMP
Definition: hc.h:44
#define MIN_ABS_INNER_TEMP
Definition: comm.h:74
#define OUT_TMP_SHDN_TH
Definition: hc.h:34
#define IV_HCREC
Definition: hc.h:13
#define SHTDN_DUR
Definition: hc.h:39
Definition: setup.h:89
#define ENG_CTRL_DUR
Definition: hc.h:19
#define REV_CURRENT_VALUE
Definition: init.h:27
#define DELTA_TEMP
Definition: hc.h:8
Definition: types.h:129
#define IV_SHOW
Definition: types.h:282
Definition: types.h:125
Definition: setup.h:93

statically allocated list of setup items in eeprom

Definition at line 24 of file setup.c.

Referenced by DoSetup(), GetSetupValues(), PrintPage(), and SetSetupValues().