comparison src/comm.asm @ 651:682c514c53c0

3.21 release preparations
author heinrichsweikamp
date Fri, 14 Apr 2023 09:00:19 +0200
parents 8c1f1f334275
children 75e90cd0c2c3
comparison
equal deleted inserted replaced
650:bc214815deb2 651:682c514c53c0
973 comm_read_option: 973 comm_read_option:
974 SERIAL_LC_SEND 0x72 ; acknowledge command 974 SERIAL_LC_SEND 0x72 ; acknowledge command
975 SERIAL_CC_RECEIVE lo ; (try to) receive option index 975 SERIAL_CC_RECEIVE lo ; (try to) receive option index
976 btfsc rs232_rx_timeout ; received option index? 976 btfsc rs232_rx_timeout ; received option index?
977 bra comm_command_loop ; NO - show rx timeout message and back to command loop 977 bra comm_command_loop ; NO - show rx timeout message and back to command loop
978 978
979 ; option index 0x00 - 0x0F: unused 979 ; option index 0x00 - 0x0F: unused
980 movlw 0x0F ; last option index of the unused range 980 movlw 0x0F ; last option index of the unused range
981 cpfsgt lo ; received option index > end of unused range ? 981 cpfsgt lo ; received option index > end of unused range ?
982 bra comm_command_error ; NO - show error message and back to command loop 982 bra comm_command_error ; NO - show error message and back to command loop
983 983
990 movlw 0x1E ; last option index for setpoint 990 movlw 0x1E ; last option index for setpoint
991 cpfsgt lo ; received option index > end of setpoint range ? 991 cpfsgt lo ; received option index > end of setpoint range ?
992 bra comm_read_sp ; NO - process setpoint read 992 bra comm_read_sp ; NO - process setpoint read
993 993
994 ; option index = 0x49 - special handling button polarity 994 ; option index = 0x49 - special handling button polarity
995 movf lo,W ; copy option index to WREG 995 movlw 0x49
996 iorlw 0x49 ; received option index for button polarity ? 996 cpfseq lo ; received option index for button polarity ?
997 bz comm_read_button_polarity ; YES - process button polarity read 997 bra $+4 ; NO
998 bra comm_read_button_polarity ; YES - process button polarity read
998 999
999 ; option index 0x1F - 0xF9: options managed by option table 1000 ; option index 0x1F - 0xF9: options managed by option table
1000 movlw 0xF9 ; last option index for options 1001 movlw 0xF9 ; last option index for options
1001 cpfsgt lo ; received option index > end of options range? 1002 cpfsgt lo ; received option index > end of options range?
1002 bra comm_read_option_index ; YES - process option value read via index 1003 bra comm_read_option_index ; YES - process option value read via index
1028 movlw 0x1E ; last option index for setpoint 1029 movlw 0x1E ; last option index for setpoint
1029 cpfsgt lo ; received option index > end of setpoint range ? 1030 cpfsgt lo ; received option index > end of setpoint range ?
1030 bra comm_write_sp ; NO - process setpoint write 1031 bra comm_write_sp ; NO - process setpoint write
1031 1032
1032 ; option index = 0x49 - special handling button polarity 1033 ; option index = 0x49 - special handling button polarity
1033 movf lo,W ; copy option index to WREG 1034 movlw 0x49
1034 iorlw 0x49 ; received option index for button polarity ? 1035 cpfseq lo ; received option index for button polarity ?
1035 bz comm_write_button_polarity ; YES - process button polarity write 1036 bra $+4 ; NO
1037 bra comm_write_button_polarity ; YES - process button polarity write
1036 1038
1037 ; option index 0x1F - 0xF9: options managed by option table 1039 ; option index 0x1F - 0xF9: options managed by option table
1038 movlw 0xF9 ; last option index for options 1040 movlw 0xF9 ; last option index for options
1039 cpfsgt lo ; received option index > end of options range? 1041 cpfsgt lo ; received option index > end of options range?
1040 bra comm_write_option_index ; YES - process option value write via index 1042 bra comm_write_option_index ; YES - process option value write via index