Mercurial > public > hwos_code
comparison src/start.asm @ 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 |
|---|---|
| 126 | 126 |
| 127 ; flag that later restart origins from a cold start | 127 ; flag that later restart origins from a cold start |
| 128 bsf cold_start | 128 bsf cold_start |
| 129 | 129 |
| 130 ; get button type from bootloader info | 130 ; get button type from bootloader info |
| 131 bcf adjustable_buttons ; assume non-adjustable by default | |
| 131 bsf analog_switches ; assume analog buttons by default | 132 bsf analog_switches ; assume analog buttons by default |
| 132 movlw 0x7C ; set up read from 0x01F77C | 133 movlw 0x7C ; set up read from 0x01F77C |
| 133 movwf TBLPTRL ; ... | 134 movwf TBLPTRL ; ... |
| 134 movlw 0xF7 ; ... | 135 movlw 0xF7 ; ... |
| 135 movwf TBLPTRH ; ... | 136 movwf TBLPTRH ; ... |
| 137 movwf TBLPTRU ; ... | 138 movwf TBLPTRU ; ... |
| 138 TBLRD*+ ; read configuration byte | 139 TBLRD*+ ; read configuration byte |
| 139 movlw 0x07 ; coding for analog buttons | 140 movlw 0x07 ; coding for analog buttons |
| 140 cpfseq TABLAT ; equal? | 141 cpfseq TABLAT ; equal? |
| 141 bcf analog_switches ; NO - no analog buttons | 142 bcf analog_switches ; NO - no analog buttons |
| 143 btfsc analog_switches ; analog buttons? | |
| 144 bsf adjustable_buttons ; Yes! analog are always adjustable | |
| 142 | 145 |
| 143 ; get screen type (2) from bootloader info | 146 ; get screen type (2) from bootloader info |
| 144 bsf screen_type2 ; set flags for later clear of the false one | 147 bsf screen_type2 ; set flags for later clear of the false one |
| 145 bsf screen_type3 ; ... | 148 bsf screen_type3 ; ... |
| 146 bsf screen_type4 ; ... | 149 bsf screen_type4 ; ... |
| 235 bsf use_old_batt_flag ; NO - reload last battery data | 238 bsf use_old_batt_flag ; NO - reload last battery data |
| 236 | 239 |
| 237 call lt2942_get_status ; check for gauge IC | 240 call lt2942_get_status ; check for gauge IC |
| 238 btfss battery_gauge_available ; cR or 2 hardware? | 241 btfss battery_gauge_available ; cR or 2 hardware? |
| 239 bra start_check_new_firmware ; NO - skip next | 242 bra start_check_new_firmware ; NO - skip next |
| 243 | |
| 244 call eeprom_serial_number_read ; read OSTC serial number | |
| 245 movff lo,sub_a+0 | |
| 246 movff hi,sub_a+1 | |
| 247 MOVLI .15000,sub_b | |
| 248 call cmpU16 | |
| 249 btfss neg_flag ; serial >14999 | |
| 250 bra start_check_new_firmware ; YES - skip next | |
| 251 | |
| 240 movlw .30 ; YES - load default button sensitivity | 252 movlw .30 ; YES - load default button sensitivity |
| 241 movff WREG,opt_cR_button_right ; - set default for left button | 253 movff WREG,opt_cR_button_right ; - set default for left button |
| 242 movff WREG,opt_cR_button_left ; - set default for right button | 254 movff WREG,opt_cR_button_left ; - set default for right button |
| 243 call piezo_config ; - configure buttons, 1st pass | 255 call piezo_config ; - configure buttons, 1st pass |
| 244 call piezo_config ; - configure buttons, 2nd pass | 256 call piezo_config ; - configure buttons, 2nd pass |
| 257 bsf adjustable_buttons ; 2015-style adjustable digital | |
| 245 | 258 |
| 246 start_check_new_firmware: | 259 start_check_new_firmware: |
| 247 call TFT_boot ; initialize TFT (includes clear screen & backlight switch-off) | 260 call TFT_boot ; initialize TFT (includes clear screen & backlight switch-off) |
| 248 | 261 |
| 249 ; show heinrichs weikamp logo | 262 ; show heinrichs weikamp logo |
