comparison code_part1/OSTC_code_c_part2/shared_definitions.h @ 167:cb055a7d75f3

+ Use overlay local vars. + Make all private functions static. + Merge calc_tissue 2sec and 1min + Merge sim_tissue 1min and 10min + Expose basic display utilities for c-code. + Prepare stand-alone utilities for p2_main.c testing platform. + New c utility: int read_custom_function(cf#)
author JeanDo
date Mon, 24 Jan 2011 23:31:57 +0100
parents 8b5b848db4cd
children 494587193f5d
comparison
equal deleted inserted replaced
166:80de93d72a17 167:cb055a7d75f3
44 #endif 44 #endif
45 45
46 #ifdef __18CXX 46 #ifdef __18CXX
47 //------------------------------------------------------------------------ 47 //------------------------------------------------------------------------
48 // C-style declarations: 48 // C-style declarations:
49 # define VAR_UCHAR(n) unsigned char n 49 # ifdef TEST_MAIN
50 # define TAB_UCHAR(n,size) unsigned char n[size] 50 # define VAR_UCHAR(n) extern unsigned char n
51 # define VAR_UINT(n) unsigned int n 51 # define TAB_UCHAR(n,size) extern unsigned char n[size]
52 # define TAB_UINT(n,size) unsigned int n[size] 52 # define VAR_UINT(n) extern unsigned int n
53 # define TAB_UINT(n,size) extern unsigned int n[size]
54 # else
55 # define VAR_UCHAR(n) unsigned char n
56 # define TAB_UCHAR(n,size) unsigned char n[size]
57 # define VAR_UINT(n) unsigned int n
58 # define TAB_UINT(n,size) unsigned int n[size]
59 # endif
53 #else 60 #else
54 ;------------------------------------------------------------------------- 61 ;-------------------------------------------------------------------------
55 ; ASM-style declarations: 62 ; ASM-style declarations:
56 #define VAR_UCHAR(n) n res 1 63 #define VAR_UCHAR(n) n res 1
57 #define TAB_UCHAR(n,size) n res size 64 #define TAB_UCHAR(n,size) n res size
116 VAR_UINT (int_I_pres_respiration); // 123 VAR_UINT (int_I_pres_respiration); //
117 VAR_UINT (int_I_pres_surface); // 124 VAR_UINT (int_I_pres_surface); //
118 VAR_UINT (int_I_temp); // new in v101 125 VAR_UINT (int_I_temp); // new in v101
119 VAR_UCHAR (char_I_temp); // new in v101 126 VAR_UCHAR (char_I_temp); // new in v101
120 VAR_UCHAR (char_I_actual_ppO2); // 127 VAR_UCHAR (char_I_actual_ppO2); //
121 VAR_UCHAR (char_I_deco_N2_ratio2); // new in v.109
122 VAR_UCHAR (char_I_deco_He_ratio2); // new in v.109
123 VAR_UCHAR (char_I_deco_N2_ratio3); // new in v.109
124 VAR_UCHAR (char_I_deco_He_ratio3); // new in v.109
125 VAR_UCHAR (char_I_deco_N2_ratio4); // new in v.109
126 VAR_UCHAR (char_I_deco_He_ratio4); // new in v.109
127 VAR_UCHAR (char_I_deco_N2_ratio5); // new in v.109
128 VAR_UCHAR (char_I_deco_He_ratio5); // new in v.109
129 VAR_UCHAR (char_I_N2_ratio); // 128 VAR_UCHAR (char_I_N2_ratio); //
130 VAR_UCHAR (char_I_He_ratio); // 129 VAR_UCHAR (char_I_He_ratio); //
131 VAR_UCHAR (char_I_saturation_multiplier); // for conservatism/safety values 1.0 no conservatism to 1.5 50% faster saturation 130 VAR_UCHAR (char_I_saturation_multiplier); // for conservatism/safety values 1.0 no conservatism to 1.5 50% faster saturation
132 VAR_UCHAR (char_I_desaturation_multiplier);// for conservatism/safety values 0.66 50% slower desaturation to 1.0 no conservatism// consveratism used in calc_tissue , calc_tissue_step_1_min and sim_tissue_1min 131 VAR_UCHAR (char_I_desaturation_multiplier);// for conservatism/safety values 0.66 50% slower desaturation to 1.0 no conservatism// consveratism used in calc_tissue , calc_tissue_step_1_min and sim_tissue_1min
133 VAR_UCHAR (char_I_GF_High_percentage); // new in v.102 132 VAR_UCHAR (char_I_GF_High_percentage); // new in v.102
134 VAR_UCHAR (char_I_GF_Low_percentage); // new in v.102 133 VAR_UCHAR (char_I_GF_Low_percentage); // new in v.102
135 VAR_UCHAR (char_I_deco_distance); // 134 VAR_UCHAR (char_I_deco_distance); //
136 VAR_UCHAR (char_I_const_ppO2); // new in v.101 135 VAR_UCHAR (char_I_const_ppO2); // new in v.101
137 VAR_UCHAR (char_I_deco_ppO2_change); // new in v.101 136 VAR_UCHAR (char_I_deco_ppO2_change); // new in v.101
138 VAR_UCHAR (char_I_deco_ppO2); // new in v.101 137 VAR_UCHAR (char_I_deco_ppO2); // new in v.101
139 VAR_UCHAR (char_I_deco_gas_change); // new in v.101
140 VAR_UCHAR (char_I_deco_N2_ratio); // new in v.101
141 VAR_UCHAR (char_I_deco_He_ratio); // new in v.101
142 VAR_UCHAR (char_I_depth_last_deco); // new in v.101 unit: [m] 138 VAR_UCHAR (char_I_depth_last_deco); // new in v.101 unit: [m]
143 VAR_UCHAR (char_I_deco_model); // new in v.102 1 = MultiGraF, sonst Std. mit de-saturation_multiplier 139 VAR_UCHAR (char_I_deco_model); // new in v.102. 0 == ZH-L16, 1 = ZH-L16-GF (Grandiant facttor)
144 140
141 VAR_UCHAR (char_I_deco_gas_change1); // new in v.101
145 VAR_UCHAR (char_I_deco_gas_change2); // new in v.109 142 VAR_UCHAR (char_I_deco_gas_change2); // new in v.109
146 VAR_UCHAR (char_I_deco_gas_change3); // new in v.109 143 VAR_UCHAR (char_I_deco_gas_change3); // new in v.109
147 VAR_UCHAR (char_I_deco_gas_change4); // new in v.109 144 VAR_UCHAR (char_I_deco_gas_change4); // new in v.109
148 VAR_UCHAR (char_I_deco_gas_change5); // new in v.109 145 VAR_UCHAR (char_I_deco_gas_change5); // new in v.109
146
147 VAR_UCHAR (char_I_deco_N2_ratio1); // new in v.101
148 VAR_UCHAR (char_I_deco_He_ratio1); // new in v.101
149 VAR_UCHAR (char_I_deco_N2_ratio2); // new in v.109
150 VAR_UCHAR (char_I_deco_He_ratio2); // new in v.109
151 VAR_UCHAR (char_I_deco_N2_ratio3); // new in v.109
152 VAR_UCHAR (char_I_deco_He_ratio3); // new in v.109
153 VAR_UCHAR (char_I_deco_N2_ratio4); // new in v.109
154 VAR_UCHAR (char_I_deco_He_ratio4); // new in v.109
155 VAR_UCHAR (char_I_deco_N2_ratio5); // new in v.109
156 VAR_UCHAR (char_I_deco_He_ratio5); // new in v.109
157
158 #ifdef __18CXX
159 //----------------------------------------------------------------------------
160 // Access to various utilities defined in ASM-code.
161 //
162 // Note: Need to switch to BANK1 before calling most of them !
163 extern unsigned char win_top, win_leftx2, win_font, win_invert;
164 extern ram unsigned char letter[26];
165
166 extern void PLED_ClearScreen(void);
167 extern void PLED_standard_color(void);
168 extern void PLED_warnings_color(void);
169 extern void PLED_divemask_color(void);
170
171 extern void PLED_box(void);
172 extern void PLED_frame(void);
173 extern void aa_wordprocessor(void);
174
175 /// Set WREG color.
176 extern void PLED_set_color(void);
177 #endif