comparison src/comm.asm @ 159:2eb037f48c3f

1.51 beta release - 1.52 beta start
author heinrichsweikamp
date Mon, 08 Sep 2014 13:07:22 +0200
parents 5ee76921e359
children 95d05cc14736
comparison
equal deleted inserted replaced
158:683321c09cfa 159:2eb037f48c3f
823 call rs232_wait_tx ; Wait for UART 823 call rs232_wait_tx ; Wait for UART
824 bra comm_download_mode0 ; Done. Loop with timeout reset 824 bra comm_download_mode0 ; Done. Loop with timeout reset
825 825
826 ;----------------------------------------------------------------------------- 826 ;-----------------------------------------------------------------------------
827 827
828 comm_read_unused:
829 bra comm_download_mode0 ; Done. Loop with timeout reset
830
828 comm_read_setting: 831 comm_read_setting:
829 movlw "r" 832 movlw "r"
830 movwf TXREG1 833 movwf TXREG1
831 call rs232_get_byte 834 call rs232_get_byte
832 btfsc rs232_recieve_overflow ; Got byte? 835 btfsc rs232_recieve_overflow ; Got byte?
833 bra comm_read_abort ; No, abort! 836 bra comm_read_abort ; No, abort!
834 call rs232_wait_tx ; Wait for UART 837 call rs232_wait_tx ; Wait for UART
835 movf RCREG1,W ; Copy 838 movf RCREG1,W ; Copy
836 bz comm_read_unused ; RCREG1=0 839 bz comm_read_unused ; RCREG1=0x00
837 dcfsnz WREG 840 dcfsnz WREG
838 bra comm_read_unused ; RCREG1=1 841 bra comm_read_unused ; RCREG1=0x01
839 dcfsnz WREG 842 dcfsnz WREG
840 bra comm_read_unused ; RCREG1=2 843 bra comm_read_unused ; RCREG1=0x02
841 dcfsnz WREG 844 dcfsnz WREG
842 bra comm_read_unused ; RCREG1=3 845 bra comm_read_unused ; RCREG1=0x03
843 dcfsnz WREG 846 dcfsnz WREG
844 bra comm_read_unused ; RCREG1=4 847 bra comm_read_unused ; RCREG1=0x04
845 dcfsnz WREG 848 dcfsnz WREG
846 bra comm_read_unused ; RCREG1=5 849 bra comm_read_unused ; RCREG1=0x05
847 dcfsnz WREG 850 dcfsnz WREG
848 bra comm_read_unused ; RCREG1=6 851 bra comm_read_unused ; RCREG1=0x06
849 dcfsnz WREG 852 dcfsnz WREG
850 bra comm_read_unused ; RCREG1=7 853 bra comm_read_unused ; RCREG1=0x07
851 dcfsnz WREG 854 dcfsnz WREG
852 bra comm_read_unused ; RCREG1=8 855 bra comm_read_unused ; RCREG1=0x08
853 dcfsnz WREG 856 dcfsnz WREG
854 bra comm_read_unused ; RCREG1=9 857 bra comm_read_unused ; RCREG1=0x09
855 dcfsnz WREG 858 dcfsnz WREG
856 bra comm_read_unused ; RCREG1=10 859 bra comm_read_unused ; RCREG1=0x0A
857 dcfsnz WREG 860 dcfsnz WREG
858 bra comm_read_unused ; RCREG1=11 861 bra comm_read_unused ; RCREG1=0x0B
859 dcfsnz WREG 862 dcfsnz WREG
860 bra comm_read_unused ; RCREG1=12 863 bra comm_read_unused ; RCREG1=0x0C
861 dcfsnz WREG 864 dcfsnz WREG
862 bra comm_read_unused ; RCREG1=13 865 bra comm_read_unused ; RCREG1=0x0D
863 dcfsnz WREG 866 dcfsnz WREG
864 bra comm_read_unused ; RCREG1=14 867 bra comm_read_unused ; RCREG1=0x0E
865 dcfsnz WREG 868 dcfsnz WREG
866 bra comm_read_unused ; RCREG1=15 869 bra comm_read_unused ; RCREG1=0x0F
867 dcfsnz WREG 870 dcfsnz WREG
868 bra comm_read_gas1 ; RCREG1=0x10 871 bra comm_read_gas1 ; RCREG1=0x10
869 dcfsnz WREG 872 dcfsnz WREG
870 bra comm_read_gas2 ; RCREG1=0x11 873 bra comm_read_gas2 ; RCREG1=0x11
871 dcfsnz WREG 874 dcfsnz WREG
893 dcfsnz WREG 896 dcfsnz WREG
894 bra comm_read_sp4 ; RCREG1=0x1D 897 bra comm_read_sp4 ; RCREG1=0x1D
895 dcfsnz WREG 898 dcfsnz WREG
896 bra comm_read_sp5 ; RCREG1=0x1E 899 bra comm_read_sp5 ; RCREG1=0x1E
897 dcfsnz WREG 900 dcfsnz WREG
898 bra comm_read_ccr_mode ; RCREG1=0x1F 901 movff opt_ccr_mode, TXREG1 ; RCREG1=0x1F
899 dcfsnz WREG 902 dcfsnz WREG
900 bra comm_read_dive_mode ; RCREG1=0x20 903 movff opt_dive_mode, TXREG1 ; RCREG1=0x20
901 dcfsnz WREG 904 dcfsnz WREG
902 bra comm_read_decotype ; RCREG1=0x21 905 movff char_I_deco_model, TXREG1 ; RCREG1=0x21
903 dcfsnz WREG 906 dcfsnz WREG
904 bra comm_read_ppo2_max ; RCREG1=0x22 907 movff opt_ppO2_max, TXREG1 ; RCREG1=0x22
905 dcfsnz WREG 908 dcfsnz WREG
906 bra comm_read_ppo2_min ; RCREG1=0x23 909 movff opt_ppO2_min, TXREG1 ; RCREG1=0x23
907 dcfsnz WREG 910 dcfsnz WREG
908 bra comm_read_ftts ; RCREG1=0x24 911 movff char_I_extra_time, TXREG1 ; RCREG1=0x24
909 dcfsnz WREG 912 dcfsnz WREG
910 bra comm_read_gf_low ; RCREG1=0x25 913 movff opt_GF_low, TXREG1 ; RCREG1=0x25
911 dcfsnz WREG 914 dcfsnz WREG
912 bra comm_read_gf_high ; RCREG1=0x26 915 movff opt_GF_high, TXREG1 ; RCREG1=0x26
913 dcfsnz WREG 916 dcfsnz WREG
914 bra comm_read_agf_low ; RCREG1=0x27 917 movff opt_aGF_low, TXREG1 ; RCREG1=0x27
915 dcfsnz WREG 918 dcfsnz WREG
916 bra comm_read_agf_high ; RCREG1=0x28 919 movff opt_aGF_high, TXREG1 ; RCREG1=0x28
917 dcfsnz WREG 920 dcfsnz WREG
918 bra comm_read_agf_selectable ; RCREG1=0x29 921 movff opt_enable_aGF, TXREG1 ; RCREG1=0x29
919 dcfsnz WREG 922 dcfsnz WREG
920 bra comm_read_saturation ; RCREG1=0x2A 923 movff char_I_saturation_multiplier, TXREG1; RCREG1=0x2A
921 dcfsnz WREG 924 dcfsnz WREG
922 bra comm_read_desaturation ; RCREG1=0x2B 925 movff char_I_desaturation_multiplier, TXREG1; RCREG1=0x2B
923 dcfsnz WREG 926 dcfsnz WREG
924 bra comm_read_last_deco ; RCREG1=0x2C 927 movff opt_last_stop, TXREG1 ; RCREG1=0x2C
925 dcfsnz WREG 928 dcfsnz WREG
926 bra comm_read_brightness ; RCREG1=0x2D 929 movff opt_brightness, TXREG1 ; RCREG1=0x2D
927 dcfsnz WREG 930 dcfsnz WREG
928 bra comm_read_units ; RCREG1=0x2E 931 movff opt_units, TXREG1 ; RCREG1=0x2E
929 dcfsnz WREG 932 dcfsnz WREG
930 bra comm_read_samplingrate ; RCREG1=0x2F 933 movff opt_sampling_rate, TXREG1 ; RCREG1=0x2F
931 dcfsnz WREG 934 dcfsnz WREG
932 bra comm_read_salinity ; RCREG1=0x30 935 movff opt_salinity, TXREG1 ; RCREG1=0x30
933 dcfsnz WREG 936 dcfsnz WREG
934 bra comm_read_divemode_colour ; RCREG1=0x31 937 movff opt_dive_color_scheme, TXREG1 ; RCREG1=0x31
935 dcfsnz WREG 938 dcfsnz WREG
936 bra comm_read_language ; RCREG1=0x32 939 movff opt_language, TXREG1 ; RCREG1=0x32
937 dcfsnz WREG 940 dcfsnz WREG
938 bra comm_read_date_format ; RCREG1=0x33 941 movff opt_dateformat, TXREG1 ; RCREG1=0x33
939 dcfsnz WREG 942 dcfsnz WREG
940 bra comm_read_compass_gain ; RCREG1=0x34 943 movff opt_compass_gain, TXREG1 ; RCREG1=0x34
941 dcfsnz WREG 944 dcfsnz WREG
942 bra comm_read_pressure_adjust ; RCREG1=0x35 945 movff opt_pressure_adjust, TXREG1 ; RCREG1=0x35
943 dcfsnz WREG 946 dcfsnz WREG
944 bra comm_read_safety_stop ; RCREG1=0x36 947 movff opt_enable_safetystop, TXREG1 ; RCREG1=0x36
945 dcfsnz WREG 948 dcfsnz WREG
946 bra comm_read_calibration_gas ; RCREG1=0x37 949 movff opt_calibration_O2_ratio, TXREG1; RCREG1=0x37
947 dcfsnz WREG 950 dcfsnz WREG
948 bra comm_read_fallback ; RCREG1=0x38 951 movff opt_sensor_fallback, TXREG1 ; RCREG1=0x38
949 dcfsnz WREG 952 dcfsnz WREG
950 bra comm_read_flip_screen ; RCREG1=0x39 953 movff opt_flip_screen, TXREG1 ; RCREG1=0x39
951 954
952 comm_read_unused:
953 comm_read_abort: 955 comm_read_abort:
954 bra comm_download_mode0 ; Done. Loop with timeout reset 956 bra comm_download_mode0 ; Done. Loop with timeout reset
955 957
956 comm_read_setting_wait: 958 comm_read_setting_wait:
957 call rs232_wait_tx ; Wait for UART 959 call rs232_wait_tx ; Wait for UART
1076 comm_read_sp5: 1078 comm_read_sp5:
1077 movff char_I_setpoint_cbar+4, TXREG1 1079 movff char_I_setpoint_cbar+4, TXREG1
1078 rcall comm_read_setting_wait ; Wait for UART 1080 rcall comm_read_setting_wait ; Wait for UART
1079 movff char_I_setpoint_change+4, TXREG1 1081 movff char_I_setpoint_change+4, TXREG1
1080 bra comm_read_done ; Done. Wait for UART and loop with timeout reset 1082 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1081 comm_read_ccr_mode: 1083
1082 movff opt_ccr_mode, TXREG1 1084
1083 bra comm_read_done ; Done. Wait for UART and loop with timeout reset 1085 ;-----------------------------------------------------------------------------
1084 comm_read_dive_mode: 1086
1085 movff opt_dive_mode, TXREG1 1087 comm_write_unused:
1086 bra comm_read_done ; Done. Wait for UART and loop with timeout reset 1088 goto comm_write_abort
1087 comm_read_decotype:
1088 movff char_I_deco_model, TXREG1
1089 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1090 comm_read_ppo2_max:
1091 movff opt_ppO2_max, TXREG1
1092 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1093 comm_read_ppo2_min:
1094 movff opt_ppO2_min, TXREG1
1095 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1096 comm_read_ftts:
1097 movff char_I_extra_time, TXREG1
1098 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1099 comm_read_gf_low:
1100 movff opt_GF_low, TXREG1
1101 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1102 comm_read_gf_high:
1103 movff opt_GF_high, TXREG1
1104 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1105 comm_read_agf_low:
1106 movff opt_aGF_low, TXREG1
1107 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1108 comm_read_agf_high:
1109 movff opt_aGF_high, TXREG1
1110 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1111 comm_read_agf_selectable:
1112 movff opt_enable_aGF, TXREG1
1113 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1114 comm_read_saturation:
1115 movff char_I_saturation_multiplier, TXREG1
1116 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1117 comm_read_desaturation:
1118 movff char_I_desaturation_multiplier, TXREG1
1119 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1120 comm_read_last_deco:
1121 movff opt_last_stop, TXREG1
1122 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1123 comm_read_brightness:
1124 movff opt_brightness, TXREG1
1125 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1126 comm_read_units:
1127 movff opt_units, TXREG1
1128 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1129 comm_read_samplingrate:
1130 movff opt_sampling_rate, TXREG1
1131 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1132 comm_read_salinity:
1133 movff opt_salinity, TXREG1
1134 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1135 comm_read_divemode_colour:
1136 movff opt_dive_color_scheme, TXREG1
1137 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1138 comm_read_language:
1139 movff opt_language, TXREG1
1140 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1141 comm_read_date_format:
1142 movff opt_dateformat, TXREG1
1143 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1144 comm_read_compass_gain:
1145 movff opt_compass_gain, TXREG1
1146 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1147 comm_read_pressure_adjust:
1148 movff opt_pressure_adjust, TXREG1
1149 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1150 comm_read_safety_stop:
1151 movff opt_enable_safetystop, TXREG1
1152 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1153 comm_read_calibration_gas:
1154 movff opt_calibration_O2_ratio, TXREG1
1155 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1156 comm_read_fallback:
1157 movff opt_sensor_fallback, TXREG1
1158 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1159 comm_read_flip_screen:
1160 movff opt_flip_screen, TXREG1
1161 bra comm_read_done ; Done. Wait for UART and loop with timeout reset
1162
1163
1164 ;-----------------------------------------------------------------------------
1165
1166 1089
1167 comm_write_setting: 1090 comm_write_setting:
1168 movlw "w" 1091 movlw "w"
1169 movwf TXREG1 1092 movwf TXREG1
1170 rcall comm_write_get_byte ; "Byte 2" 1093 rcall comm_write_get_byte ; "Byte 2"
1172 bra comm_write_abort ; No, abort! 1095 bra comm_write_abort ; No, abort!
1173 movff RCREG1,temp1 ; Copy 1096 movff RCREG1,temp1 ; Copy
1174 rcall comm_write_get_byte ; "Byte 3" 1097 rcall comm_write_get_byte ; "Byte 3"
1175 call rs232_wait_tx ; Wait for UART 1098 call rs232_wait_tx ; Wait for UART
1176 movf temp1,W 1099 movf temp1,W
1177 bz comm_write_unused ; RCREG1=0 1100 bz comm_write_unused ; RCREG1=0x00
1178 dcfsnz WREG 1101 dcfsnz WREG
1179 bra comm_write_unused ; RCREG1=1 1102 bra comm_write_unused ; RCREG1=0x01
1180 dcfsnz WREG 1103 dcfsnz WREG
1181 bra comm_write_unused ; RCREG1=2 1104 bra comm_write_unused ; RCREG1=0x02
1182 dcfsnz WREG 1105 dcfsnz WREG
1183 bra comm_write_unused ; RCREG1=3 1106 bra comm_write_unused ; RCREG1=0x03
1184 dcfsnz WREG 1107 dcfsnz WREG
1185 bra comm_write_unused ; RCREG1=4 1108 bra comm_write_unused ; RCREG1=0x04
1186 dcfsnz WREG 1109 dcfsnz WREG
1187 bra comm_write_unused ; RCREG1=5 1110 bra comm_write_unused ; RCREG1=0x05
1188 dcfsnz WREG 1111 dcfsnz WREG
1189 bra comm_write_unused ; RCREG1=6 1112 bra comm_write_unused ; RCREG1=0x06
1190 dcfsnz WREG 1113 dcfsnz WREG
1191 bra comm_write_unused ; RCREG1=7 1114 bra comm_write_unused ; RCREG1=0x07
1192 dcfsnz WREG 1115 dcfsnz WREG
1193 bra comm_write_unused ; RCREG1=8 1116 bra comm_write_unused ; RCREG1=0x08
1194 dcfsnz WREG 1117 dcfsnz WREG
1195 bra comm_write_unused ; RCREG1=9 1118 bra comm_write_unused ; RCREG1=0x09
1196 dcfsnz WREG 1119 dcfsnz WREG
1197 bra comm_write_unused ; RCREG1=10 1120 bra comm_write_unused ; RCREG1=0x0A
1198 dcfsnz WREG 1121 dcfsnz WREG
1199 bra comm_write_unused ; RCREG1=11 1122 bra comm_write_unused ; RCREG1=0x0B
1200 dcfsnz WREG 1123 dcfsnz WREG
1201 bra comm_write_unused ; RCREG1=12 1124 bra comm_write_unused ; RCREG1=0x0C
1202 dcfsnz WREG 1125 dcfsnz WREG
1203 bra comm_write_unused ; RCREG1=13 1126 bra comm_write_unused ; RCREG1=0x0D
1204 dcfsnz WREG 1127 dcfsnz WREG
1205 bra comm_write_unused ; RCREG1=14 1128 bra comm_write_unused ; RCREG1=0x0E
1206 dcfsnz WREG 1129 dcfsnz WREG
1207 bra comm_write_unused ; RCREG1=15 1130 bra comm_write_unused ; RCREG1=0x0F
1208 dcfsnz WREG 1131 dcfsnz WREG
1209 bra comm_write_gas1 ; RCREG1=0x10 1132 bra comm_write_gas1 ; RCREG1=0x10
1210 dcfsnz WREG 1133 dcfsnz WREG
1211 bra comm_write_gas2 ; RCREG1=0x11 1134 bra comm_write_gas2 ; RCREG1=0x11
1212 dcfsnz WREG 1135 dcfsnz WREG
1234 dcfsnz WREG 1157 dcfsnz WREG
1235 bra comm_write_sp4 ; RCREG1=0x1D 1158 bra comm_write_sp4 ; RCREG1=0x1D
1236 dcfsnz WREG 1159 dcfsnz WREG
1237 bra comm_write_sp5 ; RCREG1=0x1E 1160 bra comm_write_sp5 ; RCREG1=0x1E
1238 dcfsnz WREG 1161 dcfsnz WREG
1239 bra comm_write_ccr_mode ; RCREG1=0x1F 1162 movff RCREG1, opt_ccr_mode ; RCREG1=0x1F
1240 dcfsnz WREG 1163 dcfsnz WREG
1241 bra comm_write_dive_mode ; RCREG1=0x20 1164 movff RCREG1, opt_dive_mode ; RCREG1=0x20
1242 dcfsnz WREG 1165 dcfsnz WREG
1243 bra comm_write_decotype ; RCREG1=0x21 1166 movff RCREG1, char_I_deco_model ; RCREG1=0x21
1244 dcfsnz WREG 1167 dcfsnz WREG
1245 bra comm_write_ppo2_max ; RCREG1=0x22 1168 movff RCREG1, opt_ppO2_max ; RCREG1=0x22
1246 dcfsnz WREG 1169 dcfsnz WREG
1247 bra comm_write_ppo2_min ; RCREG1=0x23 1170 movff RCREG1, opt_ppO2_min ; RCREG1=0x23
1248 dcfsnz WREG 1171 dcfsnz WREG
1249 bra comm_write_ftts ; RCREG1=0x24 1172 movff RCREG1, char_I_extra_time ; RCREG1=0x24
1250 dcfsnz WREG 1173 dcfsnz WREG
1251 bra comm_write_gf_low ; RCREG1=0x25 1174 movff RCREG1, opt_GF_low ; RCREG1=0x25
1252 dcfsnz WREG 1175 dcfsnz WREG
1253 bra comm_write_gf_high ; RCREG1=0x26 1176 movff RCREG1, opt_GF_high ; RCREG1=0x26
1254 dcfsnz WREG 1177 dcfsnz WREG
1255 bra comm_write_agf_low ; RCREG1=0x27 1178 movff RCREG1, opt_aGF_low ; RCREG1=0x27
1256 dcfsnz WREG 1179 dcfsnz WREG
1257 bra comm_write_agf_high ; RCREG1=0x28 1180 movff RCREG1, opt_aGF_high ; RCREG1=0x28
1258 dcfsnz WREG 1181 dcfsnz WREG
1259 bra comm_write_agf_selectable ; RCREG1=0x29 1182 movff RCREG1, opt_enable_aGF ; RCREG1=0x29
1260 dcfsnz WREG 1183 dcfsnz WREG
1261 bra comm_write_saturation ; RCREG1=0x2A 1184 movff RCREG1, char_I_saturation_multiplier; RCREG1=0x2A
1262 dcfsnz WREG 1185 dcfsnz WREG
1263 bra comm_write_desaturation ; RCREG1=0x2B 1186 movff RCREG1, char_I_desaturation_multiplier; RCREG1=0x2B
1264 dcfsnz WREG 1187 dcfsnz WREG
1265 bra comm_write_last_deco ; RCREG1=0x2C 1188 movff RCREG1, opt_last_stop ; RCREG1=0x2C
1266 dcfsnz WREG 1189 dcfsnz WREG
1267 bra comm_write_brightness ; RCREG1=0x2D 1190 movff RCREG1, opt_brightness ; RCREG1=0x2D
1268 dcfsnz WREG 1191 dcfsnz WREG
1269 bra comm_write_units ; RCREG1=0x2E 1192 movff RCREG1, opt_units ; RCREG1=0x2E
1270 dcfsnz WREG 1193 dcfsnz WREG
1271 bra comm_write_samplingrate ; RCREG1=0x2F 1194 movff RCREG1, opt_sampling_rate ; RCREG1=0x2F
1272 dcfsnz WREG 1195 dcfsnz WREG
1273 bra comm_write_salinity ; RCREG1=0x30 1196 movff RCREG1, opt_salinity ; RCREG1=0x30
1274 dcfsnz WREG 1197 dcfsnz WREG
1275 bra comm_write_divemode_colour ; RCREG1=0x31 1198 movff RCREG1, opt_dive_color_scheme ; RCREG1=0x31
1276 dcfsnz WREG 1199 dcfsnz WREG
1277 bra comm_write_language ; RCREG1=0x32 1200 movff RCREG1, opt_language ; RCREG1=0x32
1278 dcfsnz WREG 1201 dcfsnz WREG
1279 bra comm_write_date_format ; RCREG1=0x33 1202 movff RCREG1, opt_dateformat ; RCREG1=0x33
1280 dcfsnz WREG 1203 dcfsnz WREG
1281 bra comm_write_compass_gain ; RCREG1=0x34 1204 movff RCREG1, opt_compass_gain ; RCREG1=0x34
1282 dcfsnz WREG 1205 dcfsnz WREG
1283 bra comm_write_pressure_adjust ; RCREG1=0x35 1206 movff RCREG1, opt_pressure_adjust ; RCREG1=0x35
1284 dcfsnz WREG 1207 dcfsnz WREG
1285 bra comm_write_safety_stop ; RCREG1=0x36 1208 movff RCREG1, opt_enable_safetystop ; RCREG1=0x36
1286 dcfsnz WREG 1209 dcfsnz WREG
1287 bra comm_write_calibration_gas ; RCREG1=0x37 1210 movff RCREG1, opt_calibration_O2_ratio; RCREG1=0x37
1288 dcfsnz WREG 1211 dcfsnz WREG
1289 bra comm_write_fallback ; RCREG1=0x38 1212 movff RCREG1, opt_sensor_fallback ; RCREG1=0x38
1290 dcfsnz WREG 1213 dcfsnz WREG
1291 bra comm_write_flip_screen ; RCREG1=0x39 1214 movff RCREG1, opt_flip_screen ; RCREG1=0x39
1292 1215
1293 comm_write_unused:
1294 comm_write_abort: 1216 comm_write_abort:
1295 ; Check Options, gases and diluents 1217 ; Check Options, gases and diluents
1296 call option_check_all ; Check all options (and reset if not within their min/max boundaries) 1218 call option_check_all ; Check all options (and reset if not within their min/max boundaries)
1297 bsf ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") 1219 bsf ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10")
1298 call gaslist_cleanup_list ; Takes care that only one gas can be first and first has 0m change depth 1220 call gaslist_cleanup_list ; Takes care that only one gas can be first and first has 0m change depth
1420 bra comm_write_abort ; Done. Loop with timeout reset 1342 bra comm_write_abort ; Done. Loop with timeout reset
1421 comm_write_sp5: 1343 comm_write_sp5:
1422 movff RCREG1,char_I_setpoint_cbar+4 1344 movff RCREG1,char_I_setpoint_cbar+4
1423 rcall comm_write_get_byte 1345 rcall comm_write_get_byte
1424 movff RCREG1,char_I_setpoint_change+4 1346 movff RCREG1,char_I_setpoint_change+4
1425 bra comm_write_abort ; Done. Loop with timeout reset
1426
1427 comm_write_ccr_mode:
1428 movff RCREG1, opt_ccr_mode
1429 bra comm_write_abort ; Done. Loop with timeout reset
1430 comm_write_dive_mode:
1431 movff RCREG1, opt_dive_mode
1432 bra comm_write_abort ; Done. Loop with timeout reset
1433 comm_write_decotype:
1434 movff RCREG1, char_I_deco_model
1435 bra comm_write_abort ; Done. Loop with timeout reset
1436 comm_write_ppo2_max:
1437 movff RCREG1, opt_ppO2_max
1438 bra comm_write_abort ; Done. Loop with timeout reset
1439 comm_write_ppo2_min:
1440 movff RCREG1, opt_ppO2_min
1441 bra comm_write_abort ; Done. Loop with timeout reset
1442 comm_write_ftts:
1443 movff RCREG1, char_I_extra_time
1444 bra comm_write_abort ; Done. Loop with timeout reset
1445 comm_write_gf_low:
1446 movff RCREG1, opt_GF_low
1447 bra comm_write_abort ; Done. Loop with timeout reset
1448 comm_write_gf_high:
1449 movff RCREG1, opt_GF_high
1450 bra comm_write_abort ; Done. Loop with timeout reset
1451 comm_write_agf_low:
1452 movff RCREG1, opt_aGF_low
1453 bra comm_write_abort ; Done. Loop with timeout reset
1454 comm_write_agf_high:
1455 movff RCREG1, opt_aGF_high
1456 bra comm_write_abort ; Done. Loop with timeout reset
1457 comm_write_agf_selectable:
1458 movff RCREG1, opt_enable_aGF
1459 bra comm_write_abort ; Done. Loop with timeout reset
1460 comm_write_saturation:
1461 movff RCREG1, char_I_saturation_multiplier
1462 bra comm_write_abort ; Done. Loop with timeout reset
1463 comm_write_desaturation:
1464 movff RCREG1, char_I_desaturation_multiplier
1465 bra comm_write_abort ; Done. Loop with timeout reset
1466 comm_write_last_deco:
1467 movff RCREG1, opt_last_stop
1468 bra comm_write_abort ; Done. Loop with timeout reset
1469 comm_write_brightness:
1470 movff RCREG1, opt_brightness
1471 bra comm_write_abort ; Done. Loop with timeout reset
1472 comm_write_units:
1473 movff RCREG1, opt_units
1474 bra comm_write_abort ; Done. Loop with timeout reset
1475 comm_write_samplingrate:
1476 movff RCREG1, opt_sampling_rate
1477 bra comm_write_abort ; Done. Loop with timeout reset
1478 comm_write_salinity:
1479 movff RCREG1, opt_salinity
1480 bra comm_write_abort ; Done. Loop with timeout reset
1481 comm_write_divemode_colour:
1482 movff RCREG1, opt_dive_color_scheme
1483 bra comm_write_abort ; Done. Loop with timeout reset
1484 comm_write_language:
1485 movff RCREG1, opt_language
1486 bra comm_write_abort ; Done. Loop with timeout reset
1487 comm_write_date_format:
1488 movff RCREG1, opt_dateformat
1489 bra comm_write_abort ; Done. Loop with timeout reset
1490 comm_write_compass_gain:
1491 movff RCREG1, opt_compass_gain
1492 bra comm_write_abort ; Done. Loop with timeout reset
1493 comm_write_pressure_adjust:
1494 movff RCREG1, opt_pressure_adjust
1495 bra comm_write_abort ; Done. Loop with timeout reset
1496 comm_write_safety_stop:
1497 movff RCREG1, opt_enable_safetystop
1498 bra comm_write_abort ; Done. Loop with timeout reset
1499 comm_write_calibration_gas:
1500 movff RCREG1, opt_calibration_O2_ratio
1501 bra comm_write_abort ; Done. Loop with timeout reset
1502 comm_write_fallback:
1503 movff RCREG1, opt_sensor_fallback
1504 bra comm_write_abort ; Done. Loop with timeout reset
1505 comm_write_flip_screen:
1506 movff RCREG1, opt_flip_screen
1507 bra comm_write_abort ; Done. Loop with timeout reset 1347 bra comm_write_abort ; Done. Loop with timeout reset
1508 1348
1509 ;----------------------------------------------------------------------------- 1349 ;-----------------------------------------------------------------------------
1510 1350
1511 comm_send_string: 1351 comm_send_string: