comparison src/hwos.inc @ 654:75e90cd0c2c3

hwOS sport 10.77 release
author heinrichsweikamp
date Thu, 14 Mar 2024 16:56:46 +0100
parents bc214815deb2
children
comparison
equal deleted inserted replaced
653:8bcd138ab744 654:75e90cd0c2c3
2 ; 2 ;
3 ; File hwos.inc * combined next generation V3.12.3 3 ; File hwos.inc * combined next generation V3.12.3
4 ; 4 ;
5 ; OSTC Platform Definitions 5 ; OSTC Platform Definitions
6 ; 6 ;
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. 7 ; Copyright (c) 2011, JD Gascuel, heinrichs weikamp gmbh, all right reserved.
8 ;============================================================================= 8 ;=============================================================================
9 ; HISTORY 9 ; HISTORY
10 ; 2011-05-24 : [jDG] Cleanups from initial Matthias code 10 ; 2011-05-24 : [jDG] Cleanups from initial Matthias code
11 ;============================================================================= 11 ;=============================================================================
12 12
40 ; ---- Scrolling Menu Support 40 ; ---- Scrolling Menu Support
41 ;#DEFINE scrolling_menu_enabled ; disabled 41 ;#DEFINE scrolling_menu_enabled ; disabled
42 42
43 43
44 ; ---- Logo Address Vectors 44 ; ---- Logo Address Vectors
45 #DEFINE hw_logo_block 0x01E000 ; color image data for heinrichsweikamp 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 49
49 50
50 ;-----------------------------EEPROM DATA ------------------------------------ 51 ;-----------------------------EEPROM DATA ------------------------------------
51 ; Automatic reset of all options when this is changed: 52 ; Automatic reset of all options when this is changed:
52 #DEFINE eeprom_opt_version .8 ; range: 16 bit 53 #DEFINE eeprom_opt_version .8 ; range: 16 bit
306 #DEFINE offset_ncr18650 .29065 ; 65536-(3.1Ah/0.085mAh) 307 #DEFINE offset_ncr18650 .29065 ; 65536-(3.1Ah/0.085mAh)
307 308
308 #DEFINE capacity_ur16650 .235 ; 2.0Ah/0.085mAh/100 [%] 309 #DEFINE capacity_ur16650 .235 ; 2.0Ah/0.085mAh/100 [%]
309 #DEFINE offset_ur16650 .42006 ; 65536-(2.0Ah/0.085mAh) 310 #DEFINE offset_ur16650 .42006 ; 65536-(2.0Ah/0.085mAh)
310 311
311 312 #DEFINE capacity_404050 .141 ; 1.2Ah/0.085mAh/100 [%]
313 #DEFINE offset_404050 .51418 ; 65536-(1.2Ah/0.085mAh)
314
312 ; ---- Power Consumption Values 315 ; ---- Power Consumption Values
313 #DEFINE current_sleepmode .31 316 #DEFINE current_sleepmode .31
314 #DEFINE current_backlight_multi .115 ; * CCPR1L + current_backlight_offset (restricted to <= 255) 317 #DEFINE current_backlight_multi .115 ; * CCPR1L + current_backlight_offset (restricted to <= 255)
315 #DEFINE current_backlight_offset .216 318 #DEFINE current_backlight_offset .216
316 #DEFINE current_speed_eco .1914 319 #DEFINE current_speed_eco .1914
487 #DEFINE battery_is_36v HW_variants,7 ; =1: a 3.6 Volt battery is detected 490 #DEFINE battery_is_36v HW_variants,7 ; =1: a 3.6 Volt battery is detected
488 491
489 ;---- Hardware - OSTC Model Variants2 (stored in access RAM, NOT cleared in restart) 492 ;---- Hardware - OSTC Model Variants2 (stored in access RAM, NOT cleared in restart)
490 #DEFINE press_sensor_type HW_variants2,0 ; =1: pressure sensor MS5837, =0: Pressure sensor MS5541 493 #DEFINE press_sensor_type HW_variants2,0 ; =1: pressure sensor MS5837, =0: Pressure sensor MS5541
491 #DEFINE less_io_cpu HW_variants2,1 ; =1: OSTC has a CPU with less I/O pins 494 #DEFINE less_io_cpu HW_variants2,1 ; =1: OSTC has a CPU with less I/O pins
492 ; HW_variants2,2 ; --- unused 495 #DEFINE screen_type4 HW_variants2,2 ; =1: display type 4, =0: display type 0 or 1 or 2 or 3
493 ; HW_variants2,3 ; --- unused 496 #DEFINE dn_flag HW_variants2,3 ; =1: dn
494 ; HW_variants2,4 ; --- unused 497 ; HW_variants2,4 ; --- unused
495 ; HW_variants2,5 ; --- unused 498 ; HW_variants2,5 ; --- unused
496 ; HW_variants2,6 ; --- unused 499 ; HW_variants2,6 ; --- unused
497 ; HW_variants2,7 ; --- unused 500 ; HW_variants2,7 ; --- unused
498 501
518 521
519 ;---- Hardware - States 3 (stored in access RAM, NOT cleared on restart) 522 ;---- Hardware - States 3 (stored in access RAM, NOT cleared on restart)
520 #DEFINE ms5837_state HW_flags_state3,0 ; =1: result of pressure is in the ADC 523 #DEFINE ms5837_state HW_flags_state3,0 ; =1: result of pressure is in the ADC
521 #DEFINE i2c_busy_pressure HW_flags_state3,1 ; =1: Currently updating pressure from MS5837 524 #DEFINE i2c_busy_pressure HW_flags_state3,1 ; =1: Currently updating pressure from MS5837
522 #DEFINE eeprom_write_error_flag HW_flags_state3,2 ; =1: an EEPROM write error occurred (Reset only in a Reboot/POR) 525 #DEFINE eeprom_write_error_flag HW_flags_state3,2 ; =1: an EEPROM write error occurred (Reset only in a Reboot/POR)
523 ; HW_flags_state3,3 ; --- unused 526 #DEFINE lock_cycle_counter HW_flags_state3,3 ; =1: Do not count charge cycle (again), cleared when batt_percent<95%
524 ; HW_flags_state3,4 ; --- unused 527 ; HW_flags_state3,4 ; --- unused
525 ; HW_flags_state3,5 ; --- unused 528 ; HW_flags_state3,5 ; --- unused
526 ; HW_flags_state3,6 ; --- unused 529 ; HW_flags_state3,6 ; --- unused
527 ; HW_flags_state3,7 ; --- unused 530 ; HW_flags_state3,7 ; --- unused
528 531
588 ; Flags - stored in bank common 591 ; Flags - stored in bank common
589 ;----------------------------------------------------------------------------- 592 ;-----------------------------------------------------------------------------
590 593
591 ;---- Dive Mode - Dive States 594 ;---- Dive Mode - Dive States
592 #DEFINE use_aGF DM_flags_state,0 ; =1: use aGF, =0: use GF 595 #DEFINE use_aGF DM_flags_state,0 ; =1: use aGF, =0: use GF
593 #DEFINE deco_locked DM_flags_state,1 ; =1: in or has been in deco obligation during the dive 596 ;#DEFINE deco_locked DM_flags_state,1 ; =1: in or has been in deco obligation during the dive
594 #DEFINE deco_region DM_flags_state,2 ; =1: in or has been in the deco stops region during the dive 597 #DEFINE deco_region DM_flags_state,2 ; =1: in or has been in the deco stops region during the dive
595 #DEFINE cave_mode DM_flags_state,3 ; =1: cave mode is active (cave mode) 598 #DEFINE cave_mode DM_flags_state,3 ; =1: cave mode is active (cave mode)
596 #DEFINE dive_turned DM_flags_state,4 ; =1: dive is turned (cave mode) 599 #DEFINE dive_turned DM_flags_state,4 ; =1: dive is turned (cave mode)
597 #DEFINE backtrack_almost_full DM_flags_state,5 ; =1: the backtracking storage is almost full (cave mode) 600 #DEFINE backtrack_almost_full DM_flags_state,5 ; =1: the backtracking storage is almost full (cave mode)
598 #DEFINE backtrack_entire_full DM_flags_state,6 ; =1: the backtracking storage is entirely full (cave mode) 601 #DEFINE backtrack_entire_full DM_flags_state,6 ; =1: the backtracking storage is entirely full (cave mode)
1332 backtrack_deltatime res 1 ; time elapsed since last depth recording in seconds 1335 backtrack_deltatime res 1 ; time elapsed since last depth recording in seconds
1333 backtrack_waypoint_num res 1 ; current waypoint number 1336 backtrack_waypoint_num res 1 ; current waypoint number
1334 backtrack_waypoint_turn res 1 ; waypoint number of the turn point 1337 backtrack_waypoint_turn res 1 ; waypoint number of the turn point
1335 ENDIF 1338 ENDIF
1336 1339
1337 ;---- Dive Mode / apnoe mode (2 byte) 1340 ;---- Dive Mode / apnoe mode (3 byte)
1338 apnoe_max_pressure res 2 ; max depth over all dives in the series 1341 apnoe_max_pressure res 2 ; max depth over all dives in the series
1342 apnoe_dive_counter res 1 ; apnoe #dive counter
1339 1343
1340 ;---- Profile Recording (6 byte) 1344 ;---- Profile Recording (6 byte)
1341 alarm_type res 1 ; alarm states recording 1345 alarm_type res 1 ; alarm states recording
1342 event_byte1 res 1 ; events recording 1346 event_byte1 res 1 ; events recording
1343 event_byte2 res 1 ; events recording 1347 event_byte2 res 1 ; events recording
1458 1462
1459 ;---- tft_outputs.asm 1463 ;---- tft_outputs.asm
1460 pressure_update_lag_counter res 1 ; lag time counter for fast surface pressure display updating 1464 pressure_update_lag_counter res 1 ; lag time counter for fast surface pressure display updating
1461 gp_debug res 2 ; General Purpose debug registers 1465 gp_debug res 2 ; General Purpose debug registers
1462 1466
1463 ; 203 byte used, 5 byte free (208 byte total) 1467 ; 204 byte used, 4 byte free (208 byte total)
1464 1468
1465 1469
1466 ;----------------------------------------------------------------------------- 1470 ;-----------------------------------------------------------------------------
1467 ; LOCAL DATA 1471 ; LOCAL DATA
1468 ;----------------------------------------------------------------------------- 1472 ;-----------------------------------------------------------------------------
1595 i2c_error_vault res 2 ; Store last used device ID and data byte 1599 i2c_error_vault res 2 ; Store last used device ID and data byte
1596 D1_buffer res 3 ; Buffer of D1 (Sensor raw data) 1600 D1_buffer res 3 ; Buffer of D1 (Sensor raw data)
1597 D2_buffer res 3 ; Buffer of D2 (Sensor raw data) 1601 D2_buffer res 3 ; Buffer of D2 (Sensor raw data)
1598 1602
1599 brightness res 1 ; =0: Eco, =1:Medium, =2:Full 1603 brightness res 1 ; =0: Eco, =1:Medium, =2:Full
1600 ; 157 byte used, 92 byte free 1604 charge_cycles res 2 ; 16bit charge cycles counter
1605 ; 159 byte used, 90 byte free
1601 1606
1602 1607
1603 ;----------------------------------------------------------------------------- 1608 ;-----------------------------------------------------------------------------
1604 ; Bank 2 General Purpose Buffer 1 1609 ; Bank 2 General Purpose Buffer 1
1605 ;----------------------------------------------------------------------------- 1610 ;-----------------------------------------------------------------------------
1721 opt_gas_density_check res 1 ; =1: gas density is checked (effective in CCR / pSCR modes only) 1726 opt_gas_density_check res 1 ; =1: gas density is checked (effective in CCR / pSCR modes only)
1722 opt_comm_timeout res 1 ; comm RX timeout in multiples of 10 ms 1727 opt_comm_timeout res 1 ; comm RX timeout in multiples of 10 ms
1723 opt_fallback res 1 ; unused dummy option for compatibility with 3rd party tools 1728 opt_fallback res 1 ; unused dummy option for compatibility with 3rd party tools
1724 opt_conservatism 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
1725 opt_warning_level_divemode res 1 ; warning verbose level (divemode) =0: Less, =1: All 1730 opt_warning_level_divemode res 1 ; warning verbose level (divemode) =0: Less, =1: All
1726 1731 opt_timeformat res 1 ; =0:24h, =1:12h
1732
1727 ;---- RX Function Settings 1733 ;---- RX Function Settings
1728 opt_transmitter_id_1 res 2 ; 16 bit transmitter ID for Gas 1 1734 opt_transmitter_id_1 res 2 ; 16 bit transmitter ID for Gas 1
1729 opt_transmitter_id_2 res 2 ; 16 bit transmitter ID for Gas 2 1735 opt_transmitter_id_2 res 2 ; 16 bit transmitter ID for Gas 2
1730 opt_transmitter_id_3 res 2 ; 16 bit transmitter ID for Gas 3 1736 opt_transmitter_id_3 res 2 ; 16 bit transmitter ID for Gas 3
1731 opt_transmitter_id_4 res 2 ; 16 bit transmitter ID for Gas 4 1737 opt_transmitter_id_4 res 2 ; 16 bit transmitter ID for Gas 4
1738 opt_TR_mode res 1 ; TR functions - mode 1744 opt_TR_mode res 1 ; TR functions - mode
1739 opt_TR_1st_pres res 1 ; TR functions - 1st pressure assignment 1745 opt_TR_1st_pres res 1 ; TR functions - 1st pressure assignment
1740 opt_TR_2nd_pres res 1 ; TR functions - 2nd pressure assignment 1746 opt_TR_2nd_pres res 1 ; TR functions - 2nd pressure assignment
1741 opt_TR_Bail_pres res 1 ; TR functions - bailout pressure assignment 1747 opt_TR_Bail_pres res 1 ; TR functions - bailout pressure assignment
1742 1748
1743 ; ==> 193 bytes used - 51 bytes free (244 usable bytes only in bank 14 as the upper 12 1749 ; ==> 194 bytes used - 50 bytes free (244 usable bytes only in bank 14 as the upper 12
1744 ; bytes are reserved for special function registers) 1750 ; bytes are reserved for special function registers)
1745 1751
1746 ;----------------------------------------------------------------------------- 1752 ;-----------------------------------------------------------------------------