comparison src/hwos.inc @ 656:8af5aefbcdaf default tip

Update to 3.31 beta
author heinrichsweikamp
date Thu, 27 Nov 2025 18:32:58 +0100
parents 75e90cd0c2c3
children
comparison
equal deleted inserted replaced
655:c7b7b8a358cd 656:8af5aefbcdaf
43 43
44 ; ---- Logo Address Vectors 44 ; ---- Logo Address Vectors
45 #DEFINE hw_logo_block 0x01E000 ; color image data for heinrichs weikamp gmbh logo 45 #DEFINE hw_logo_block 0x01E000 ; color image data for heinrichs weikamp gmbh logo
46 #DEFINE comm_logo_1 0x01EEDE ; color image data for USB or BT logo 46 #DEFINE comm_logo_1 0x01EEDE ; color image data for USB or BT logo
47 #DEFINE comm_logo_2 0x01EA04 ; color image data for BT logo, "+" bootloader 47 #DEFINE comm_logo_2 0x01EA04 ; color image data for BT logo, "+" bootloader
48 #DEFINE comm_logo_3 0x01E936 ; color image data for BT logo, dn bootloader 48 #DEFINE comm_logo_3 0x01EE10 ; color image data for BT logo, dn bootloader
49 49
50 50
51 ;-----------------------------EEPROM DATA ------------------------------------ 51 ;-----------------------------EEPROM DATA ------------------------------------
52 ; Automatic reset of all options when this is changed: 52 ; Automatic reset of all options when this is changed:
53 #DEFINE eeprom_opt_version .8 ; range: 16 bit 53 #DEFINE eeprom_opt_version .8 ; range: 16 bit
273 #DEFINE aa_15v_high .1550 ; [mV] Energizer 1.5 V E2 AA - highest possible voltage, value must be lower than value of lithium_36v_low! 273 #DEFINE aa_15v_high .1550 ; [mV] Energizer 1.5 V E2 AA - highest possible voltage, value must be lower than value of lithium_36v_low!
274 #DEFINE aa_15v_low .1100 ; [mV] Energizer 1.5 V E2 AA - lowest possible voltage, according to Energizer data sheet EBC-4201R, page 2 274 #DEFINE aa_15v_low .1100 ; [mV] Energizer 1.5 V E2 AA - lowest possible voltage, according to Energizer data sheet EBC-4201R, page 2
275 #DEFINE battery_show_level .30 ; [%] threshold when to show battery level 275 #DEFINE battery_show_level .30 ; [%] threshold when to show battery level
276 #DEFINE battery_warn_level_36 .15 ; [%] threshold for 3.6 V battery warning, also acts as threshold for setting display brightness level to ECO when in dive mode 276 #DEFINE battery_warn_level_36 .15 ; [%] threshold for 3.6 V battery warning, also acts as threshold for setting display brightness level to ECO when in dive mode
277 #DEFINE battery_warn_level_15 .25 ; [%] threshold for 1.5 V battery warning, also acts as threshold for setting display brightness level to ECO when in dive mode 277 #DEFINE battery_warn_level_15 .25 ; [%] threshold for 1.5 V battery warning, also acts as threshold for setting display brightness level to ECO when in dive mode
278 278 #DEFINE battery_cycle_counter_unlock .95 ; [%] threshold to unlock the charge cycle counter for a new charge cycle to count
279 279
280 #DEFINE rechargeable_36V_80 .3950 ; [mV] fixed threshold, from UR16650ZTA.PDF, page 2, 0°C
281 #DEFINE rechargeable_36V_60 .3780 ; [mV] fixed threshold, from UR16650ZTA.PDF, page 2, 0°C
282 #DEFINE rechargeable_36V_40 .3650 ; [mV] fixed threshold, from UR16650ZTA.PDF, page 2, 0°C
283 #DEFINE rechargeable_36V_20 .3500 ; [mV] fixed threshold, from UR16650ZTA.PDF, page 2, 0°C
284 #DEFINE rechargeable_36V_00 .3350 ; [mV] fixed threshold, from UR16650ZTA.PDF, page 2, 0°C
285
280 ; ---- 3.6 Volt Battery Sensing Data Points at 70 mA Load 286 ; ---- 3.6 Volt Battery Sensing Data Points at 70 mA Load
281 #DEFINE lithium_36v_75 .3000 ; [mV] 287 #DEFINE lithium_36v_75 .3000 ; [mV]
282 #DEFINE lithium_36v_50 .2900 ; [mV] 288 #DEFINE lithium_36v_50 .2900 ; [mV]
283 #DEFINE lithium_36v_25 .2600 ; [mV] 289 #DEFINE lithium_36v_25 .2600 ; [mV]
284 #DEFINE lithium_36v_10 .2500 ; [mV] 290 #DEFINE lithium_36v_10 .2500 ; [mV]
290 ; a) devide through 364 -> result is in percent of a 2.4 Ah battery 296 ; a) devide through 364 -> result is in percent of a 2.4 Ah battery
291 ; or b) devide through 121 -> result is in percent of a 0.8 Ah battery 297 ; or b) devide through 121 -> result is in percent of a 0.8 Ah battery
292 298
293 299
294 ; ---- internal Battery Gauging 300 ; ---- internal Battery Gauging
295 #DEFINE capacity_saft_internal .364 301 #DEFINE capacity_saft_internal .364
296 #DEFINE capacity_panasonic_internal .121 302 #DEFINE capacity_14500_internal .121
297 303
298 304
299 ; Gauge IC 305 ; Gauge IC
300 #DEFINE capacity_saft .271 ; 2.3Ah/0.085mAh/100 [%] 306 #DEFINE capacity_saft .271 ; 2.3Ah/0.085mAh/100 [%]
301 #DEFINE offset_saft .38477 ; 65536-(2.3Ah/0.085mAh) 307 #DEFINE offset_saft .38477 ; 65536-(2.3Ah/0.085mAh)
302 308
303 #DEFINE capacity_panasonic .94 ; 0.8Ah/0.085mAh/100 [%] 309 #DEFINE capacity_14500 .94 ; 0.8Ah/0.085mAh/100 [%]
304 #DEFINE offset_panasonic .56124 ; 65536-(0.8Ah/0.085mAh) 310 #DEFINE offset_14500 .56124 ; 65536-(0.8Ah/0.085mAh)
305 311
306 #DEFINE capacity_ncr18650 .364 ; 3.1Ah/0.085mAh/100 [%] 312 #DEFINE capacity_ncr18650 .364 ; 3.1Ah/0.085mAh/100 [%]
307 #DEFINE offset_ncr18650 .29065 ; 65536-(3.1Ah/0.085mAh) 313 #DEFINE offset_ncr18650 .29065 ; 65536-(3.1Ah/0.085mAh)
308 314
309 #DEFINE capacity_ur16650 .235 ; 2.0Ah/0.085mAh/100 [%] 315 #DEFINE capacity_ur16650 .235 ; 2.0Ah/0.085mAh/100 [%]
310 #DEFINE offset_ur16650 .42006 ; 65536-(2.0Ah/0.085mAh) 316 #DEFINE offset_ur16650 .42006 ; 65536-(2.0Ah/0.085mAh)
311 317
312 #DEFINE capacity_404050 .141 ; 1.2Ah/0.085mAh/100 [%] 318 #DEFINE capacity_404050 .112 ; 0.96Ah/0.085mAh/100 [%]
313 #DEFINE offset_404050 .51418 ; 65536-(1.2Ah/0.085mAh) 319 #DEFINE offset_404050 .54241 ; 65536-(0.96Ah/0.085mAh)
314 320
315 ; ---- Power Consumption Values 321 ; ---- Power Consumption Values
316 #DEFINE current_sleepmode .31 322 #DEFINE current_sleepmode .31
317 #DEFINE current_backlight_multi .115 ; * CCPR1L + current_backlight_offset (restricted to <= 255) 323 #DEFINE current_backlight_multi .115 ; * CCPR1L + current_backlight_offset (restricted to <= 255)
318 #DEFINE current_backlight_offset .216 324 #DEFINE current_backlight_offset .216
324 330
325 331
326 ; ---- Brightness Thresholds (between zero (off) and 255 (max. power consumption)) 332 ; ---- Brightness Thresholds (between zero (off) and 255 (max. power consumption))
327 #DEFINE ambient_light_max_high_36V .170 333 #DEFINE ambient_light_max_high_36V .170
328 #DEFINE ambient_light_max_high_cr .240 334 #DEFINE ambient_light_max_high_cr .240
335 #DEFINE ambient_light_max_high_dn .240
336 #DEFINE ambient_no_sensor_high .190
329 #DEFINE ambient_light_max_high_15V .100 337 #DEFINE ambient_light_max_high_15V .100
330 #DEFINE ambient_light_min_high .35 338 #DEFINE ambient_light_min_high .35
331 #DEFINE ambient_light_max_medium .90 339 #DEFINE ambient_light_max_medium .90
340 #DEFINE ambient_no_sensor_medium .50
332 #DEFINE ambient_light_min_medium .25 341 #DEFINE ambient_light_min_medium .25
333 #DEFINE ambient_light_max_eco .50 342 #DEFINE ambient_light_max_eco .50
343 #DEFINE ambient_no_sensor_eco .20
334 #DEFINE ambient_light_min_eco .10 ; must be the lowest value! 344 #DEFINE ambient_light_min_eco .10 ; must be the lowest value!
335 345
336 346
337 ; ---- IR Link Timeout 347 ; ---- IR Link Timeout
338 #DEFINE ir_timeout_value .128 ; in multiples of 62.5 ms 348 #DEFINE ir_timeout_value .128 ; in multiples of 62.5 ms
468 ;----------------------------------------------------------------------------- 478 ;-----------------------------------------------------------------------------
469 ; Flags - stored in access RAM 479 ; Flags - stored in access RAM
470 ;----------------------------------------------------------------------------- 480 ;-----------------------------------------------------------------------------
471 481
472 ;---- Hardware - OSTC Model Descriptor (stored in access RAM, cleared & rebuilt in restart, to preserve compatibility with 3rd party tools DO NOT alter bit positions) 482 ;---- Hardware - OSTC Model Descriptor (stored in access RAM, cleared & rebuilt in restart, to preserve compatibility with 3rd party tools DO NOT alter bit positions)
473 #DEFINE battery_gauge_available HW_descriptor,0 ; =1: OSTC has rechargeable battery with battery management chip 483 #DEFINE battery_gauge_available HW_descriptor,0 ; =1: OSTC has rechargeable battery with battery management chip
474 #DEFINE ambient_sensor HW_descriptor,1 ; =1: OSTC has an ambient light sensor 484 #DEFINE ambient_sensor HW_descriptor,1 ; =1: OSTC has an ambient light sensor
475 #DEFINE ext_input_s8_ana HW_descriptor,2 ; =1: OSTC has S8/analog input 485 #DEFINE ext_input_s8_ana HW_descriptor,2 ; =1: OSTC has S8/analog input
476 #DEFINE ext_input_optical HW_descriptor,3 ; =1: OSTC has optical input 486 #DEFINE ext_input_optical HW_descriptor,3 ; =1: OSTC has optical input or uses fully digital external interface
477 #DEFINE ble_available HW_descriptor,4 ; =1: OSTC has an BT module 487 #DEFINE ble_available HW_descriptor,4 ; =1: OSTC has an BT module
478 #DEFINE ostc_rx_present HW_descriptor,5 ; =1: OSTC has RX module 488 #DEFINE ostc_rx_present HW_descriptor,5 ; =1: OSTC has RX module
479 #DEFINE lv_core HW_descriptor,6 ; =1: OSTC has low-voltage core (2.7V) 489 #DEFINE lv_core HW_descriptor,6 ; =1: OSTC has low-voltage core (2.7V)
480 #DEFINE flash_block_write HW_descriptor,7 ; =1: OSTC has FLASH with block-write capability 490 #DEFINE flash_block_write HW_descriptor,7 ; =1: OSTC has FLASH with block-write capability
481 491
492 ;---- Hardware - OSTC Model Variants2 (stored in access RAM, NOT cleared in restart) 502 ;---- Hardware - OSTC Model Variants2 (stored in access RAM, NOT cleared in restart)
493 #DEFINE press_sensor_type HW_variants2,0 ; =1: pressure sensor MS5837, =0: Pressure sensor MS5541 503 #DEFINE press_sensor_type HW_variants2,0 ; =1: pressure sensor MS5837, =0: Pressure sensor MS5541
494 #DEFINE less_io_cpu HW_variants2,1 ; =1: OSTC has a CPU with less I/O pins 504 #DEFINE less_io_cpu HW_variants2,1 ; =1: OSTC has a CPU with less I/O pins
495 #DEFINE screen_type4 HW_variants2,2 ; =1: display type 4, =0: display type 0 or 1 or 2 or 3 505 #DEFINE screen_type4 HW_variants2,2 ; =1: display type 4, =0: display type 0 or 1 or 2 or 3
496 #DEFINE dn_flag HW_variants2,3 ; =1: dn 506 #DEFINE dn_flag HW_variants2,3 ; =1: dn
497 ; HW_variants2,4 ; --- unused 507 #DEFINE screen_type5 HW_variants2,4 ; =1: display type 5, =0: display type 0 or 1 or 2 or 3 or 4
498 ; HW_variants2,5 ; --- unused 508 #DEFINE compass_type0 HW_variants2,5 ; =1: compass type 0, =0: compass type 1 or 2
499 ; HW_variants2,6 ; --- unused 509 #DEFINE compass_present HW_variants2,6 ; =1: a compass is present, =0: hardware w/o compass
500 ; HW_variants2,7 ; --- unused 510 #DEFINE battery_gauge_type HW_variants2,7 ; =1: Gauge IC LTC2959, =0: LT2942
501 511
512 ;---- Hardware - OSTC Model Variants3 (stored in access RAM, NOT cleared in restart)
513 #DEFINE dual_comm HW_variants3,0 ; =1: dual comm hardware (USB and BLE-only)
514
515
502 ;---- Hardware - States 1 (stored in access RAM, cleared on restart) 516 ;---- Hardware - States 1 (stored in access RAM, cleared on restart)
503 #DEFINE analog_sw1_pressed HW_flags_state1,0 ; =1: analog switch 1 pressed 517 #DEFINE analog_sw1_pressed HW_flags_state1,0 ; =1: analog switch 1 pressed
504 #DEFINE analog_sw2_pressed HW_flags_state1,1 ; =1: analog switch 2 pressed 518 #DEFINE analog_sw2_pressed HW_flags_state1,1 ; =1: analog switch 2 pressed
505 #DEFINE switch_left HW_flags_state1,2 ; =1: left button was pressed 519 #DEFINE switch_left HW_flags_state1,2 ; =1: left button was pressed
506 #DEFINE switch_right HW_flags_state1,3 ; =1: right button was pressed 520 #DEFINE switch_right HW_flags_state1,3 ; =1: right button was pressed
522 ;---- Hardware - States 3 (stored in access RAM, NOT cleared on restart) 536 ;---- Hardware - States 3 (stored in access RAM, NOT cleared on restart)
523 #DEFINE ms5837_state HW_flags_state3,0 ; =1: result of pressure is in the ADC 537 #DEFINE ms5837_state HW_flags_state3,0 ; =1: result of pressure is in the ADC
524 #DEFINE i2c_busy_pressure HW_flags_state3,1 ; =1: Currently updating pressure from MS5837 538 #DEFINE i2c_busy_pressure HW_flags_state3,1 ; =1: Currently updating pressure from MS5837
525 #DEFINE eeprom_write_error_flag HW_flags_state3,2 ; =1: an EEPROM write error occurred (Reset only in a Reboot/POR) 539 #DEFINE eeprom_write_error_flag HW_flags_state3,2 ; =1: an EEPROM write error occurred (Reset only in a Reboot/POR)
526 #DEFINE lock_cycle_counter HW_flags_state3,3 ; =1: Do not count charge cycle (again), cleared when batt_percent<95% 540 #DEFINE lock_cycle_counter HW_flags_state3,3 ; =1: Do not count charge cycle (again), cleared when batt_percent<95%
527 ; HW_flags_state3,4 ; --- unused 541 #DEFINE i2c_error_flag_lock HW_flags_state3,4 ; =1: The last I2C error was not displayed yet
528 ; HW_flags_state3,5 ; --- unused 542 #DEFINE i2c_reinit_sensor2 HW_flags_state3,5 ; =1: Do an I2C reset and reinitialize the pressure sensor type 2
529 ; HW_flags_state3,6 ; --- unused 543 ; HW_flags_state3,6 ; --- unused
530 ; HW_flags_state3,7 ; --- unused 544 ; HW_flags_state3,7 ; --- unused
531 545
532 ;---- Operating System - persistent Settings (stored in access RAM, NOT cleared in restart) 546 ;---- Operating System - persistent Settings (stored in access RAM, NOT cleared in restart)
533 #DEFINE sensor1_calibrated_ok OS_flags_persist,0 ; =1: sensor 1 calibration ok 547 #DEFINE sensor1_calibrated_ok OS_flags_persist,0 ; =1: sensor 1 calibration ok
564 ;---- Operating Modes (stored in access RAM, persistent) 578 ;---- Operating Modes (stored in access RAM, persistent)
565 #DEFINE sleepmode OM_flags_mode,0 ; =1: in sleep mode 579 #DEFINE sleepmode OM_flags_mode,0 ; =1: in sleep mode
566 #DEFINE divemode OM_flags_mode,1 ; =1: in dive mode 580 #DEFINE divemode OM_flags_mode,1 ; =1: in dive mode
567 #DEFINE simulatormode OM_flags_mode,2 ; =1: in simulator mode 581 #DEFINE simulatormode OM_flags_mode,2 ; =1: in simulator mode
568 #DEFINE high_altitude_mode OM_flags_mode,3 ; =1: unit was manually turned on with absolute pressure < 880 mbar 582 #DEFINE high_altitude_mode OM_flags_mode,3 ; =1: unit was manually turned on with absolute pressure < 880 mbar
569 ; OM_flags_mode,4 ; --- unused 583 #DEFINE ext_s8_full_digital OM_flags_mode,4 ; =1: External S8 full digital mode
570 #DEFINE tr_functions_activated OM_flags_mode,5 ; =1: TR module is available and TR mode is <> off 584 #DEFINE tr_functions_activated OM_flags_mode,5 ; =1: TR module is available and TR mode is <> off
571 #DEFINE cold_start OM_flags_mode,6 ; =1: restart is entered from a cold start 585 #DEFINE cold_start OM_flags_mode,6 ; =1: restart is entered from a cold start
572 IFDEF _screendump 586 IFDEF _screendump
573 #DEFINE screen_dump_avail OM_flags_mode,7 ; =1: screen dump function is available 587 #DEFINE screen_dump_avail OM_flags_mode,7 ; =1: screen dump function is available
574 ELSE 588 ELSE
806 #DEFINE aa_color_quarter AA_flags,1 ; used by aa_wordprocessor 820 #DEFINE aa_color_quarter AA_flags,1 ; used by aa_wordprocessor
807 #DEFINE aa_color_half AA_flags,2 ; used by aa_wordprocessor 821 #DEFINE aa_color_half AA_flags,2 ; used by aa_wordprocessor
808 #DEFINE aa_aux_flag AA_flags,3 ; auxiliary flag for various purposes 822 #DEFINE aa_aux_flag AA_flags,3 ; auxiliary flag for various purposes
809 #DEFINE use_custom_colors AA_flags,4 ; =1: override default pixel colors, used by color_image 823 #DEFINE use_custom_colors AA_flags,4 ; =1: override default pixel colors, used by color_image
810 #DEFINE win_invert AA_flags,5 ; =1: print in inverse video 824 #DEFINE win_invert AA_flags,5 ; =1: print in inverse video
811 ; AA_flags,6 ; --- unused 825 #DEFINE force_all_caps AA_flags,6 ; =1: force output all caps (even if there is a 0-9 in the string)
812 ; AA_flags,7 ; --- unused 826 ; AA_flags,7 ; --- unused
813 827
814 828
815 ;---- Convert Functions (Control of numerical Output) 829 ;---- Convert Functions (Control of numerical Output)
816 830
1035 ifndef INSIDE_HWOS_ASM 1049 ifndef INSIDE_HWOS_ASM
1036 1050
1037 extern HW_descriptor 1051 extern HW_descriptor
1038 extern HW_variants 1052 extern HW_variants
1039 extern HW_variants2 1053 extern HW_variants2
1054 extern HW_variants3
1040 1055
1041 extern HW_flags_state1 1056 extern HW_flags_state1
1042 extern HW_flags_state2 1057 extern HW_flags_state2
1043 extern HW_flags_state3 1058 extern HW_flags_state3
1044 1059
1080 extern battery_capacity 1095 extern battery_capacity
1081 extern battery_offset 1096 extern battery_offset
1082 extern battery_type 1097 extern battery_type
1083 extern battery_accumulated_charge 1098 extern battery_accumulated_charge
1084 extern battery_temperature 1099 extern battery_temperature
1085 extern gauge_status_byte 1100
1086 1101
1087 endif ; ACCESS_RAM_VARS 1102 endif ; ACCESS_RAM_VARS
1088 1103
1089 ;----------------------------------------------------------------------------- 1104 ;-----------------------------------------------------------------------------
1090 ; Bank0 NORMAL RAM 1105 ; Bank0 NORMAL RAM
1182 max_CCPR1L res 1 ; max. brightness value for CCPR1L 1197 max_CCPR1L res 1 ; max. brightness value for CCPR1L
1183 1198
1184 ;---- Battery Gauge (nAs, nC) 1199 ;---- Battery Gauge (nAs, nC)
1185 battery_gauge res 6 ; 48 bit -> 78 Ah max 1200 battery_gauge res 6 ; 48 bit -> 78 Ah max
1186 1201
1187 ;---- IR/S8-Link 1202 ;---- MS5541 raw calibration data
1188 ir_s8_buffer res .18 ; buffer for data received on IR/S8 interface, 1203 ms5541_rawdata res 8
1189 ; also used to buffer MS5541 raw calibration data 1204
1190 1205 IFDEF _external_sensor_eccr
1191 IFDEF _external_sensor
1192 ir_s8_counter res 1 1206 ir_s8_counter res 1
1193 ir_s8_timeout res 1 ; timeout for valid data 1207 ir_s8_timeout res 1 ; timeout for valid data
1194 ENDIF 1208 ENDIF
1195 1209
1196 ;---- raw O2 Sensor Data received on S8 Link 1210 ;---- raw O2 Sensor Data received on S8 Link
1197 IFDEF _external_sensor 1211 IFDEF _external_sensor_eccr
1198 s8_rawdata_sensor1 res 3 ; 24 bit A/D raw data from S8 HUD sensor 1 1212 s8_rawdata_sensor1 res 3 ; 24 bit A/D raw data from S8 HUD sensor 1
1199 s8_rawdata_sensor2 res 3 ; 24 bit A/D raw data from S8 HUD sensor 2 1213 s8_rawdata_sensor2 res 3 ; 24 bit A/D raw data from S8 HUD sensor 2
1200 s8_rawdata_sensor3 res 3 ; 24 bit A/D raw data from S8 HUD sensor 3 1214 s8_rawdata_sensor3 res 3 ; 24 bit A/D raw data from S8 HUD sensor 3
1215 ccr_status_byte res 2 ; Status bytes for ccr
1201 ENDIF 1216 ENDIF
1202 1217
1203 ;---- Switch Processing (8 byte, called by ISR and sleep mode) 1218 ;---- Switch Processing (8 byte, called by ISR and sleep mode)
1204 analog_sw1_raw res 2 ; idle values (average) 1219 analog_sw1_raw res 2 ; idle values (average)
1205 analog_sw2_raw res 2 ; idle values (average) 1220 analog_sw2_raw res 2 ; idle values (average)
1216 ENDIF 1231 ENDIF
1217 1232
1218 debounce_counter res 1 ; multiples of 16ms 1233 debounce_counter res 1 ; multiples of 16ms
1219 isr_tmr7_helper res 1 ; used for 1/4 second trigger 1234 isr_tmr7_helper res 1 ; used for 1/4 second trigger
1220 1235
1221 ; 158 byte used, 2 byte free 1236 ; 150 byte used, 10 byte free
1222 1237
1223 1238
1224 ;----------------------------------------------------------------------------- 1239 ;-----------------------------------------------------------------------------
1225 ; Common DATA 1240 ; Common DATA
1226 ;----------------------------------------------------------------------------- 1241 ;-----------------------------------------------------------------------------
1308 1323
1309 1324
1310 ;---- Dive Mode / all modes (26 byte) 1325 ;---- Dive Mode / all modes (26 byte)
1311 divesecs_avg_trip res 2 ; time accumulator for the resettable average depth & stopwatch 1326 divesecs_avg_trip res 2 ; time accumulator for the resettable average depth & stopwatch
1312 divesecs_avg_total res 2 ; time accumulator for the total dive average depth 1327 divesecs_avg_total res 2 ; time accumulator for the total dive average depth
1328 divesecs_compass_trip res 2 ; time accumulator for the compass stopwatch
1313 pressure_rel_avg_trip res 2 ; calculated resettable average depth 1329 pressure_rel_avg_trip res 2 ; calculated resettable average depth
1314 pressure_rel_avg_total res 2 ; calculated total dive average depth 1330 pressure_rel_avg_total res 2 ; calculated total dive average depth
1315 pressure_rel_cur_cached res 2 ; cached current relative pressure 1331 pressure_rel_cur_cached res 2 ; cached current relative pressure
1316 pressure_rel_max_cached res 2 ; cached maximum relative pressure 1332 pressure_rel_max_cached res 2 ; cached maximum relative pressure
1317 pressure_abs_cached res 2 ; cached current absolute pressure 1333 pressure_abs_cached res 2 ; cached current absolute pressure
1462 1478
1463 ;---- tft_outputs.asm 1479 ;---- tft_outputs.asm
1464 pressure_update_lag_counter res 1 ; lag time counter for fast surface pressure display updating 1480 pressure_update_lag_counter res 1 ; lag time counter for fast surface pressure display updating
1465 gp_debug res 2 ; General Purpose debug registers 1481 gp_debug res 2 ; General Purpose debug registers
1466 1482
1467 ; 204 byte used, 4 byte free (208 byte total) 1483 gauge_status_byte res 1 ; gauge IC status byte
1484
1485 ; 208 byte used, 1 byte free (208 byte total)
1468 1486
1469 1487
1470 ;----------------------------------------------------------------------------- 1488 ;-----------------------------------------------------------------------------
1471 ; LOCAL DATA 1489 ; LOCAL DATA
1472 ;----------------------------------------------------------------------------- 1490 ;-----------------------------------------------------------------------------
1516 start_secs res 1 ; second, not used, for code commonality | 1534 start_secs res 1 ; second, not used, for code commonality |
1517 1535
1518 supersat_start res 1 ; leading tissue supersaturation at beginning of the dive 1536 supersat_start res 1 ; leading tissue supersaturation at beginning of the dive
1519 1537
1520 ;---- O2 Sensors (9 byte, updated by ISR when sensors are connected via datalink) 1538 ;---- O2 Sensors (9 byte, updated by ISR when sensors are connected via datalink)
1521 IFDEF _external_sensor 1539 IFDEF _external_sensor_eccr
1522 sensor1_mv res 2 ; sensor 1 voltage in 0.1 mV steps 1540 sensor1_mv res 2 ; sensor 1 voltage in 0.1 mV steps
1523 sensor2_mv res 2 ; sensor 2 voltage in 0.1 mV steps 1541 sensor2_mv res 2 ; sensor 2 voltage in 0.1 mV steps
1524 sensor3_mv res 2 ; sensor 3 voltage in 0.1 mV steps 1542 sensor3_mv res 2 ; sensor 3 voltage in 0.1 mV steps
1525 sensor1_ppO2 res 1 ; sensor 1 ppO2 in 0.01 bar steps 1543 sensor1_ppO2 res 1 ; sensor 1 ppO2 in 0.01 bar steps
1526 sensor2_ppO2 res 1 ; sensor 2 ppO2 in 0.01 bar steps 1544 sensor2_ppO2 res 1 ; sensor 2 ppO2 in 0.01 bar steps
1594 pres_last_2nd res 2 ; last pressure reading pressure in 1/160 bar | other! 1612 pres_last_2nd res 2 ; last pressure reading pressure in 1/160 bar | other!
1595 time_last_1st res 2 ; last pressure reading time in seconds | 1613 time_last_1st res 2 ; last pressure reading time in seconds |
1596 time_last_2nd res 2 ; last pressure reading time in seconds | 1614 time_last_2nd res 2 ; last pressure reading time in seconds |
1597 ENDIF 1615 ENDIF
1598 1616
1599 i2c_error_vault res 2 ; Store last used device ID and data byte 1617 i2c_error_vault res 3 ; Store last used device ID, data byte and copy of SSP1CON2
1600 D1_buffer res 3 ; Buffer of D1 (Sensor raw data) 1618 D1_buffer res 3 ; Buffer of D1 (Sensor raw data)
1601 D2_buffer res 3 ; Buffer of D2 (Sensor raw data) 1619 D2_buffer res 3 ; Buffer of D2 (Sensor raw data)
1602 1620 i2c_error_counter res 2 ; counts I2C errors
1621
1603 brightness res 1 ; =0: Eco, =1:Medium, =2:Full 1622 brightness res 1 ; =0: Eco, =1:Medium, =2:Full
1604 charge_cycles res 2 ; 16bit charge cycles counter 1623 charge_cycles res 2 ; 16bit charge cycles counter
1605 ; 159 byte used, 90 byte free 1624
1625 ;---- IR/S8-Link
1626 ir_s8_buffer res .64 ; buffer for data received on IR/S8 interface,
1627
1628 ; 224 byte used, 25 byte free
1606 1629
1607 1630
1608 ;----------------------------------------------------------------------------- 1631 ;-----------------------------------------------------------------------------
1609 ; Bank 2 General Purpose Buffer 1 1632 ; Bank 2 General Purpose Buffer 1
1610 ;----------------------------------------------------------------------------- 1633 ;-----------------------------------------------------------------------------
1727 opt_comm_timeout res 1 ; comm RX timeout in multiples of 10 ms 1750 opt_comm_timeout res 1 ; comm RX timeout in multiples of 10 ms
1728 opt_fallback res 1 ; unused dummy option for compatibility with 3rd party tools 1751 opt_fallback res 1 ; unused dummy option for compatibility with 3rd party tools
1729 opt_conservatism res 1 ; unused dummy option for compatibility with 3rd party tools 1752 opt_conservatism res 1 ; unused dummy option for compatibility with 3rd party tools
1730 opt_warning_level_divemode res 1 ; warning verbose level (divemode) =0: Less, =1: All 1753 opt_warning_level_divemode res 1 ; warning verbose level (divemode) =0: Less, =1: All
1731 opt_timeformat res 1 ; =0:24h, =1:12h 1754 opt_timeformat res 1 ; =0:24h, =1:12h
1755 opt_BLE_compatibility res 1 ; =1: configure BLE name to hwOS style for dn hardware
1732 1756
1733 ;---- RX Function Settings 1757 ;---- RX Function Settings
1734 opt_transmitter_id_1 res 2 ; 16 bit transmitter ID for Gas 1 1758 opt_transmitter_id_1 res 2 ; 16 bit transmitter ID for Gas 1
1735 opt_transmitter_id_2 res 2 ; 16 bit transmitter ID for Gas 2 1759 opt_transmitter_id_2 res 2 ; 16 bit transmitter ID for Gas 2
1736 opt_transmitter_id_3 res 2 ; 16 bit transmitter ID for Gas 3 1760 opt_transmitter_id_3 res 2 ; 16 bit transmitter ID for Gas 3