Mercurial > public > hwos_code
comparison src/start.asm @ 480:ad8acade5567
NEW: PSCR mode (Passive semi-closed rebreather)
author | heinrichsweikamp |
---|---|
date | Mon, 06 Feb 2017 16:26:36 +0100 |
parents | 237afdfb4918 |
children | 7e6df19264b6 |
comparison
equal
deleted
inserted
replaced
479:34e73dc68799 | 480:ad8acade5567 |
---|---|
284 clrf flag7 | 284 clrf flag7 |
285 clrf flag8 | 285 clrf flag8 |
286 clrf flag9 | 286 clrf flag9 |
287 clrf flag10 | 287 clrf flag10 |
288 ; Do not clear flag11 (Sensor calibration and charger status) | 288 ; Do not clear flag11 (Sensor calibration and charger status) |
289 clrf flag12 | 289 clrf flag12 |
290 ; ; Do not clear flag13 (Important hardware flags) | 290 ; ; Do not clear flag13 (Important hardware flags) |
291 clrf hardware_flag ; hardware descriptor flag | 291 clrf flag14 |
292 clrf hardware_flag ; hardware descriptor flag | |
292 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor! | 293 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor! |
293 | 294 |
294 ; configure hardware_flag byte | 295 ; configure hardware_flag byte |
295 | 296 |
296 bsf ambient_sensor ; Set flag | 297 bsf ambient_sensor ; Set flag |
383 TSTOSS opt_sampling_rate ; =1: 10s, =0: 2s | 384 TSTOSS opt_sampling_rate ; =1: 10s, =0: 2s |
384 bra restart_set_modes_and_flags1 | 385 bra restart_set_modes_and_flags1 |
385 movlw .10 | 386 movlw .10 |
386 movwf samplingrate | 387 movwf samplingrate |
387 restart_set_modes_and_flags1: | 388 restart_set_modes_and_flags1: |
388 movff opt_dive_mode,lo ; 0=OC, 1=CC, 2=Gauge, 3=Apnea | 389 movff opt_dive_mode,lo ; 0=OC, 1=CC, 2=Gauge, 3=Apnea, 4=PSCR |
389 | 390 |
390 bcf FLAG_apnoe_mode | 391 bcf FLAG_apnoe_mode |
391 bcf FLAG_ccr_mode ; =1: CCR mode (Fixed ppO2 or Sensor) active | 392 bcf FLAG_ccr_mode ; =1: CCR mode (Fixed ppO2 or Sensor) active |
392 bcf FLAG_gauge_mode ; =1: In Gauge mode | 393 bcf FLAG_gauge_mode ; =1: In Gauge mode |
394 bcf FLAG_pscr_mode | |
393 call disable_ir_s8 ; IR off | 395 call disable_ir_s8 ; IR off |
394 | 396 |
395 tstfsz lo | 397 tstfsz lo |
396 bra restart_set_modes_and_flags2 | 398 bra restart_set_modes_and_flags2 |
397 ; OC Mode | 399 ; OC Mode |
424 ; Gauge Mode | 426 ; Gauge Mode |
425 bsf FLAG_gauge_mode ; =1: In Gauge mode | 427 bsf FLAG_gauge_mode ; =1: In Gauge mode |
426 return | 428 return |
427 | 429 |
428 restart_set_modes_and_flags4: | 430 restart_set_modes_and_flags4: |
431 decfsz lo,F | |
432 bra restart_set_modes_and_flags5 | |
429 ; Apnea Mode | 433 ; Apnea Mode |
430 bsf FLAG_apnoe_mode | 434 bsf FLAG_apnoe_mode |
431 return ; start in Surfacemode | 435 return ; start in Surfacemode |
432 | 436 |
437 restart_set_modes_and_flags5: | |
438 ; PSCR Mode | |
439 bsf FLAG_pscr_mode | |
440 return ; start in Surfacemode | |
441 | |
442 | |
433 backup_flash_page: ; backup the first 128bytes from flash to EEPROM | 443 backup_flash_page: ; backup the first 128bytes from flash to EEPROM |
434 ; Start address in internal flash | 444 ; Start address in internal flash |
435 movlw 0x00 | 445 movlw 0x00 |
436 movwf TBLPTRL | 446 movwf TBLPTRL |
437 movwf TBLPTRH | 447 movwf TBLPTRH |