comparison src/hwos.inc @ 657:c2e97f94c55f default tip

bump to 10.93 / 3.32
author heinrichsweikamp
date Tue, 27 Jan 2026 11:01:04 +0100
parents 8af5aefbcdaf
children
comparison
equal deleted inserted replaced
656:8af5aefbcdaf 657:c2e97f94c55f
73 73
74 ; ---- I2C speed 74 ; ---- I2C speed
75 #DEFINE i2c_speed_value 0x27 ;0x9C = 100kHz @ 64MHz Fosc, 0x27 = 100kHz @ 16MHz Fosc 75 #DEFINE i2c_speed_value 0x27 ;0x9C = 100kHz @ 64MHz Fosc, 0x27 = 100kHz @ 16MHz Fosc
76 76
77 ; ---- Divemode Custom View Indexes - Attention: these numbers need to be in line with the jump tables in customview.asm! 77 ; ---- Divemode Custom View Indexes - Attention: these numbers need to be in line with the jump tables in customview.asm!
78 #DEFINE index_blank .0 ; blank view 78 #DEFINE index_blank .0 ; blank view
79 #DEFINE index_avr_stopwatch .1 ; average depth and stopwatch 79 #DEFINE index_avr_stopwatch .1 ; average depth and stopwatch
80 #DEFINE index_compass_dm .2 ; compass 80 #DEFINE index_compass_dm .2 ; compass
81 #DEFINE index_ppo2_sensors .3 ; ppO2 sensors 81 #DEFINE index_ppo2_sensors .3 ; ppO2 sensors
82 #DEFINE index_sensor_check .4 ; sensor check 82 #DEFINE index_sensor_check .4 ; sensor check
83 #DEFINE index_pscr_info .5 ; pSCR data 83 #DEFINE index_pscr_info .5 ; pSCR data
84 #DEFINE index_pressures_SAC .6 ; tank pressure and SAC rate 84 #DEFINE index_pressures_SAC .6 ; tank pressure and SAC rate
85 #DEFINE index_gas_needs_ascent .7 ; gas needs for ascent / cave return 85 #DEFINE index_gas_needs_ascent .7 ; gas needs for ascent / cave return
86 #DEFINE index_cave_tts .8 ; cave mode TTS 86 #DEFINE index_cave_tts .8 ; cave mode TTS
87 #DEFINE index_decoplan .9 ; deco plan 87 #DEFINE index_decoplan .9 ; deco plan
88 #DEFINE index_ceiling_GF_tissue .10 ; ceiling, current GF and tissues 88 #DEFINE index_ceiling_GF_tissue .10 ; ceiling, current GF and tissues
89 #DEFINE index_CNS .11 ; CNS values 89 #DEFINE index_ceiling_GF_surfGF .11 ; ceiling, current GF and surface GF
90 #DEFINE index_ppo2_ead_end_cns .12 ; ppO2, END/EAD and CNS or gas density 90 #DEFINE index_CNS .12 ; CNS values
91 #DEFINE index_clock_batt_surfpress .13 ; clock, battery and surface pressure 91 #DEFINE index_ppo2_ead_end_cns .13 ; ppO2, END/EAD and CNS or gas density
92 #DEFINE index_gf_factors .14 ; GF factors 92 #DEFINE index_clock_batt_surfpress .14 ; clock, battery and surface pressure
93 #DEFINE index_cave_waypoints .15 ; cave waypoints 93 #DEFINE index_gf_factors .15 ; GF factors
94 #DEFINE index_cv_dm_max .13 ; highest index used in normal custom view rotation 94 #DEFINE index_cave_waypoints .16 ; cave waypoints
95 #DEFINE index_cv_dm_max .16 ; highest index used in normal custom view rotation
95 96
96 97
97 ; ---- Timing for button hold-down flags 98 ; ---- Timing for button hold-down flags
98 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7.8125 ms -> 1.00 s 99 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7.8125 ms -> 1.00 s
99 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7.8125 ms -> 0.25 s 100 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7.8125 ms -> 0.25 s
376 377
377 ; ---- Compass Display 378 ; ---- Compass Display
378 #DEFINE compass_fast_treshold .9 ; show new heading instantly if angular difference > compass_fast_treshold, else show animated turning of compass rose 379 #DEFINE compass_fast_treshold .9 ; show new heading instantly if angular difference > compass_fast_treshold, else show animated turning of compass rose
379 #DEFINE compass_averaging .10 ; number of averaging cycles 380 #DEFINE compass_averaging .10 ; number of averaging cycles
380 381
382 ; ---- Scrubber timer
383 #DEFINE low_scrubber_threshold .30 ; [min] Scrubber low threshold (16bit value)
381 384
382 ;----------------------------------------------------------------------------- 385 ;-----------------------------------------------------------------------------
383 ; Bit Flags 386 ; Bit Flags
384 ;----------------------------------------------------------------------------- 387 ;-----------------------------------------------------------------------------
385 388
509 #DEFINE compass_present HW_variants2,6 ; =1: a compass is present, =0: hardware w/o compass 512 #DEFINE compass_present HW_variants2,6 ; =1: a compass is present, =0: hardware w/o compass
510 #DEFINE battery_gauge_type HW_variants2,7 ; =1: Gauge IC LTC2959, =0: LT2942 513 #DEFINE battery_gauge_type HW_variants2,7 ; =1: Gauge IC LTC2959, =0: LT2942
511 514
512 ;---- Hardware - OSTC Model Variants3 (stored in access RAM, NOT cleared in restart) 515 ;---- 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) 516 #DEFINE dual_comm HW_variants3,0 ; =1: dual comm hardware (USB and BLE-only)
514 517 #DEFINE adjustable_buttons HW_variants3,1 ; =1: The buttons have adjustable sensitivity
515 518
516 ;---- Hardware - States 1 (stored in access RAM, cleared on restart) 519 ;---- Hardware - States 1 (stored in access RAM, cleared on restart)
517 #DEFINE analog_sw1_pressed HW_flags_state1,0 ; =1: analog switch 1 pressed 520 #DEFINE analog_sw1_pressed HW_flags_state1,0 ; =1: analog switch 1 pressed
518 #DEFINE analog_sw2_pressed HW_flags_state1,1 ; =1: analog switch 2 pressed 521 #DEFINE analog_sw2_pressed HW_flags_state1,1 ; =1: analog switch 2 pressed
519 #DEFINE switch_left HW_flags_state1,2 ; =1: left button was pressed 522 #DEFINE switch_left HW_flags_state1,2 ; =1: left button was pressed
737 #DEFINE attn_det_sensor3_lost DM_flags_att2_det,7 ; =1: sensor 3 lost attention issued 740 #DEFINE attn_det_sensor3_lost DM_flags_att2_det,7 ; =1: sensor 3 lost attention issued
738 741
739 #DEFINE attn_det_xmit1_bat DM_flags_att3_det,0 ; =1: xmitter 1 low batt attention issued 742 #DEFINE attn_det_xmit1_bat DM_flags_att3_det,0 ; =1: xmitter 1 low batt attention issued
740 #DEFINE attn_det_xmit2_bat DM_flags_att3_det,1 ; =1: xmitter 2 low batt attention issued 743 #DEFINE attn_det_xmit2_bat DM_flags_att3_det,1 ; =1: xmitter 2 low batt attention issued
741 #DEFINE attn_det_cns_eod DM_flags_att3_det,2 ; =1: end-of-dive CNS attention threshold reached 744 #DEFINE attn_det_cns_eod DM_flags_att3_det,2 ; =1: end-of-dive CNS attention threshold reached
742 ; DM_flags_att3_det,3 ; --- unused 745 #DEFINE attn_scrubber_timer DM_flags_att3_det,3 ; =1: Scrubber timer runs out or is negative
743 ; DM_flags_att3_det,4 ; --- unused 746 ; DM_flags_att3_det,4 ; --- unused
744 ; DM_flags_att3_det,5 ; --- unused 747 ; DM_flags_att3_det,5 ; --- unused
745 ; DM_flags_att3_det,6 ; --- unused 748 ; DM_flags_att3_det,6 ; --- unused
746 ; DM_flags_att3_det,7 ; --- unused 749 ; DM_flags_att3_det,7 ; --- unused
747 750
918 movlw HIGH (literal) ; 921 movlw HIGH (literal) ;
919 movwf address+1 ; 922 movwf address+1 ;
920 endm ; 923 endm ;
921 924
922 925
923 ; ---- arithetics 926 ; ---- arithmetics
924 927
925 INCI macro address ; INCrement Integer (version of incf for 2 byte integers) 928 INCI macro address ; INCrement Integer (version of incf for 2 byte integers)
926 infsnz address+0,F ; Attention: must be in bank where target variable resides! 929 infsnz address+0,F ; Attention: must be in bank where target variable resides!
927 incf address+1,F ; 930 incf address+1,F ;
928 endm ; 931 endm ;
1623 charge_cycles res 2 ; 16bit charge cycles counter 1626 charge_cycles res 2 ; 16bit charge cycles counter
1624 1627
1625 ;---- IR/S8-Link 1628 ;---- IR/S8-Link
1626 ir_s8_buffer res .64 ; buffer for data received on IR/S8 interface, 1629 ir_s8_buffer res .64 ; buffer for data received on IR/S8 interface,
1627 1630
1628 ; 224 byte used, 25 byte free 1631 ; 226 byte used, 23 byte free
1629 1632
1630 1633
1631 ;----------------------------------------------------------------------------- 1634 ;-----------------------------------------------------------------------------
1632 ; Bank 2 General Purpose Buffer 1 1635 ; Bank 2 General Purpose Buffer 1
1633 ;----------------------------------------------------------------------------- 1636 ;-----------------------------------------------------------------------------
1768 opt_TR_mode res 1 ; TR functions - mode 1771 opt_TR_mode res 1 ; TR functions - mode
1769 opt_TR_1st_pres res 1 ; TR functions - 1st pressure assignment 1772 opt_TR_1st_pres res 1 ; TR functions - 1st pressure assignment
1770 opt_TR_2nd_pres res 1 ; TR functions - 2nd pressure assignment 1773 opt_TR_2nd_pres res 1 ; TR functions - 2nd pressure assignment
1771 opt_TR_Bail_pres res 1 ; TR functions - bailout pressure assignment 1774 opt_TR_Bail_pres res 1 ; TR functions - bailout pressure assignment
1772 1775
1773 ; ==> 194 bytes used - 50 bytes free (244 usable bytes only in bank 14 as the upper 12 1776 ;---- Scrubber timer
1777 opt_ScrubberTime res 1 ; Scrubber timer time in 10min
1778 opt_ScrubTmrEnable res 1 ; =1: Use the Scrubber Timer, =0: Ignore the Scrubber Timer
1779 opt_scrubber_timer_mins res 2 ; The Scrubber timer in mins
1780 opt_scrubber_timer_day res 1 ; Date when then Scrubber was restarted
1781 opt_scrubber_timer_month res 1 ; Date when then Scrubber was restarted
1782 opt_scrubber_timer_year res 1 ; Date when then Scrubber was restarted
1783 ; ==> 201 bytes used - 43 bytes free (244 usable bytes only in bank 14 as the upper 12
1774 ; bytes are reserved for special function registers) 1784 ; bytes are reserved for special function registers)
1775 1785
1776 ;----------------------------------------------------------------------------- 1786 ;-----------------------------------------------------------------------------