comparison src/comm.asm @ 147:fdd4e30846ae

some cleanup
author heinrichsweikamp
date Wed, 06 Aug 2014 11:59:04 +0200
parents 9a637c9bb19a
children 074b1a9ded7b
comparison
equal deleted inserted replaced
146:d6ad414c7c12 147:fdd4e30846ae
20 #include "tft_outputs.inc" 20 #include "tft_outputs.inc"
21 #include "surfmode.inc" 21 #include "surfmode.inc"
22 #include "rtc.inc" 22 #include "rtc.inc"
23 #include "adc_lightsensor.inc" 23 #include "adc_lightsensor.inc"
24 24
25 extern testloop,new_battery_menu,restart,option_reset_all 25 extern new_battery_menu,restart,option_reset_all
26 extern char_I_dil_change, char_I_setpoint_cbar, char_I_setpoint_change 26 extern char_I_dil_change, char_I_setpoint_cbar, char_I_setpoint_change
27 extern char_I_deco_model, char_I_extra_time, char_I_saturation_multiplier, char_I_desaturation_multiplier 27 extern char_I_deco_model, char_I_extra_time, char_I_saturation_multiplier, char_I_desaturation_multiplier
28 extern option_check_all, gaslist_cleanup_list, get_first_gas_to_WREG, get_first_dil_to_WREG 28 extern option_check_all, gaslist_cleanup_list, get_first_gas_to_WREG, get_first_dil_to_WREG
29 29
30 #DEFINE timeout_comm_pre_mode .120 ; Pre-loop 30 #DEFINE timeout_comm_pre_mode .120 ; Pre-loop
530 bra comm_erase_range4kb ; erases range in 4kB steps (Get 3 bytes address and 1byte amount of 4kB blocks) 530 bra comm_erase_range4kb ; erases range in 4kB steps (Get 3 bytes address and 1byte amount of 4kB blocks)
531 movlw 0x50 531 movlw 0x50
532 cpfseq RCREG1 532 cpfseq RCREG1
533 bra $+4 533 bra $+4
534 bra comm_send_firmware ; sends firmware from external flash from 0x3E0000 to 0x3FD000 (118784bytes) via comm 534 bra comm_send_firmware ; sends firmware from external flash from 0x3E0000 to 0x3FD000 (118784bytes) via comm
535 movlw "t" 535 ; movlw "t"
536 cpfseq RCREG1 536 ; cpfseq RCREG1
537 bra $+4 537 ; bra $+4
538 goto testloop ; Start raw-data testloop 538 ; goto testloop ; Start raw-data testloop
539 movlw 0xC1 539 movlw 0xC1
540 cpfseq RCREG1 540 cpfseq RCREG1
541 bra $+4 541 bra $+4
542 bra comm_service_ll_bootloader ; Start low-level bootloader 542 bra comm_service_ll_bootloader ; Start low-level bootloader
543 bra comm_download_mode0 ; Loop with timeout reset 543 bra comm_download_mode0 ; Loop with timeout reset