comparison src/options.asm @ 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
594 IFDEF _ccr_pscr 594 IFDEF _ccr_pscr
595 ; now some rather crude hack into this routine to unify CCR & pSCR mode setting 595 ; now some rather crude hack into this routine to unify CCR & pSCR mode setting
596 movlw 0x1F ; serial ID of option oCCRMode 596 movlw 0x1F ; serial ID of option oCCRMode
597 cpfseq opt_serial ; editing oCCRMode right now? 597 cpfseq opt_serial ; editing oCCRMode right now?
598 bra option_inc_enum8_2 ; NO - check next option 598 bra option_inc_enum8_2 ; NO - check next option
599 IFDEF _external_sensor 599 IFDEF _external_sensor_eccr
600 btfsc ext_input_s8_ana ; YES - S8/analog input available? 600 btfsc ext_input_s8_ana ; YES - S8/analog input available?
601 bra option_inc_enum8_1a ; YES - setting 'sensor' allowed 601 bra option_inc_enum8_1a ; YES - setting 'sensor' allowed
602 btfsc ext_input_optical ; - optical interface available? 602 btfsc ext_input_optical ; - optical interface available?
603 bra option_inc_enum8_1a ; YES - setting 'sensor' allowed 603 bra option_inc_enum8_1a ; YES - setting 'sensor' allowed
604 ENDIF ; _external_sensor 604 btfsc ext_s8_full_digital ; are we in external S8 full digital mode?
605 bra option_inc_enum8_1a ; YES - setting 'sensor' allowed
606 ENDIF ; _external_sensor_eccr
605 movf INDF1,W ; NO to both - get mode (=0: fixed SP, =1: Sensor, =2: AutoSP) 607 movf INDF1,W ; NO to both - get mode (=0: fixed SP, =1: Sensor, =2: AutoSP)
606 xorlw .1 ; - in sensor mode? 608 xorlw .1 ; - in sensor mode?
607 bnz option_inc_enum8_1a ; NO - continue with next check 609 bnz option_inc_enum8_1a ; NO - continue with next check
608 incf INDF1,F ; YES - advance option value to AutoSP 610 incf INDF1,F ; YES - advance option value to AutoSP
609 option_inc_enum8_1a: 611 option_inc_enum8_1a:
978 banksel opt_ccr_mode ; YES - select options bank 980 banksel opt_ccr_mode ; YES - select options bank
979 bcf opt_ccr_mode,1 ; - clear bit 1 because opt_ccr_mode may only be 0 or 1 (reverts AutoSP to calculated SP, keeps sensor) 981 bcf opt_ccr_mode,1 ; - clear bit 1 because opt_ccr_mode may only be 0 or 1 (reverts AutoSP to calculated SP, keeps sensor)
980 banksel common ; - back to bank common 982 banksel common ; - back to bank common
981 bsf option_changed ; - flag that EEPROM needs to be updated 983 bsf option_changed ; - flag that EEPROM needs to be updated
982 option_cleanup_oCCRMode_CCR: ; continue from above & jump-in from start.asm if known to be in CCR mode 984 option_cleanup_oCCRMode_CCR: ; continue from above & jump-in from start.asm if known to be in CCR mode
983 IFDEF _external_sensor 985 IFDEF _external_sensor_eccr
984 btfsc ext_input_s8_ana ; S8/analog interface available? 986 btfsc ext_input_s8_ana ; S8/analog interface available?
985 return ; YES - setting 'sensor' allowed 987 return ; YES - setting 'sensor' allowed
986 btfsc ext_input_optical ; does hosting OSTC have an optical interface? 988 btfsc ext_input_optical ; does hosting OSTC have an optical interface?
987 return ; YES - setting 'sensor' allowed 989 return ; YES - setting 'sensor' allowed
988 ENDIF ; _external_sensor 990 btfsc ext_s8_full_digital ; are we in external S8 full digital mode?
991 return ; YES - setting 'sensor' allowed
992 ENDIF ; _external_sensor_eccr
989 movff opt_ccr_mode,WREG ; NO to both - get CCR mode 993 movff opt_ccr_mode,WREG ; NO to both - get CCR mode
990 xorlw .1 ; - coding for sensor 994 xorlw .1 ; - coding for sensor
991 tstfsz WREG ; - CCR mode = sensor? 995 tstfsz WREG ; - CCR mode = sensor?
992 return ; NO - setting allowed 996 return ; NO - setting allowed
993 banksel opt_ccr_mode ; YES - setting not allowed, select options bank 997 banksel opt_ccr_mode ; YES - setting not allowed, select options bank