comparison src/comm.asm @ 512:f9cc49750736

minor
author heinrichsweikamp
date Tue, 04 Jul 2017 19:01:32 +0200
parents 4e6f5c36f4cc
children b7eb98dbd800
comparison
equal deleted inserted replaced
511:7db10ebae205 512:f9cc49750736
890 ; Start=End -> Not good, abort 890 ; Start=End -> Not good, abort
891 bra comm_download_mode0 ; Done. Loop with timeout reset 891 bra comm_download_mode0 ; Done. Loop with timeout reset
892 892
893 comm_send_dive1: 893 comm_send_dive1:
894 ; Send header 894 ; Send header
895 clrf hi ; Counter 895 clrf hi ; Counter
896 rcall comm_rs232_wait_tx ; Wait for UART 896 rcall comm_rs232_wait_tx ; Wait for UART
897 call ext_flash_read_block_start ; 1st byte 897 call ext_flash_read_block_start ; 1st byte
898 movwf TXREG1 898 movwf TXREG1
899 bra comm_send_dive_header 899 bra comm_send_dive_header
900 comm_send_dive_header2: 900 comm_send_dive_header2:
901 call ext_flash_read_block ; Read one byte 901 call ext_flash_read_block ; Read one byte
902 movwf TXREG1 ; Start new transmit 902 movwf TXREG1 ; Start new transmit
903 comm_send_dive_header: 903 comm_send_dive_header:
904 rcall comm_rs232_wait_tx ; Wait for UART 904 rcall comm_rs232_wait_tx ; Wait for UART
905 decfsz hi,F 905 decfsz hi,F
906 bra comm_send_dive_header2 906 bra comm_send_dive_header2
907 call ext_flash_read_block_stop 907 call ext_flash_read_block_stop
908 908
909 ; Set address for profile 909 ; Set address for profile
910 movff ext_flash_log_pointer+0,ext_flash_address+0 910 movff ext_flash_log_pointer+0,ext_flash_address+0
911 movff ext_flash_log_pointer+1,ext_flash_address+1 911 movff ext_flash_log_pointer+1,ext_flash_address+1
912 movff ext_flash_log_pointer+2,ext_flash_address+2 912 movff ext_flash_log_pointer+2,ext_flash_address+2
913 913
914 movlw .6 ; Skip 6byte short header in profile - only for internal use 914 movlw .6 ; Skip 6byte short header in profile - only for internal use
915 call incf_ext_flash_address0_0x20 ; increases bytes in ext_flash_address:3 with 0x200000 bank switching 915 call incf_ext_flash_address0_0x20 ; increases bytes in ext_flash_address:3 with 0x200000 bank switching
916 916
917 ; Set address for short header/compact header, Byte 0
918
917 comm_send_dive_profile: 919 comm_send_dive_profile:
918 call ext_flash_byte_read_plus_0x20 ; Read one byte into temp1, takes care of banking at 0x200000 920 call ext_flash_byte_read_plus_0x20 ; Read one byte into temp1, takes care of banking at 0x200000
919 rcall comm_rs232_wait_tx ; Wait for UART 921 rcall comm_rs232_wait_tx ; Wait for UART
920 movff temp1,TXREG1 ; Send a byte 922 movff temp1,TXREG1 ; Send a byte
921 923
922 ; 24bit compare with end address 924 ; 24bit compare with end address
923 movff convert_value_temp+0,WREG 925 movff convert_value_temp+0,WREG
924 cpfseq ext_flash_address+0 926 cpfseq ext_flash_address+0
925 bra comm_send_dive_profile 927 bra comm_send_dive_profile
926 movff convert_value_temp+1,WREG 928 movff convert_value_temp+1,WREG
927 cpfseq ext_flash_address+1 929 cpfseq ext_flash_address+1
928 bra comm_send_dive_profile 930 bra comm_send_dive_profile
929 movff convert_value_temp+2,WREG 931 movff convert_value_temp+2,WREG
930 cpfseq ext_flash_address+2 932 cpfseq ext_flash_address+2
931 bra comm_send_dive_profile 933 bra comm_send_dive_profile
932 934
933 rcall comm_read_setting_wait ; Wait for UART 935 rcall comm_read_setting_wait ; Wait for UART
934 bra comm_download_mode0 ; Done. Loop with timeout reset 936 bra comm_download_mode0 ; Done. Loop with timeout reset
935 937
936 ;----------------------------------------------------------------------------- 938 ;-----------------------------------------------------------------------------
937 939
938 comm_read_setting: 940 comm_read_setting:
939 movlw "r" 941 movlw "r"