Mercurial > public > hwos_code
diff src/comm.asm @ 235:23311219dacc
under construction: new hardware_flag to configure different hardware versions
author | heinrichsweikamp |
---|---|
date | Wed, 25 Feb 2015 16:49:59 +0100 |
parents | 940155e9aefb |
children | 49512af55afc |
line wrap: on
line diff
--- a/src/comm.asm Wed Feb 25 13:57:30 2015 +0100 +++ b/src/comm.asm Wed Feb 25 16:49:59 2015 +0100 @@ -94,7 +94,7 @@ dcfsnz timeout_counter,F bra comm_service_exit ; Timeout -> Exit comm_mode2: - btfsc cr_hardware + btfsc rechargeable bra comm_mode4 ; Skip call get_battery_voltage ; gets battery voltage @@ -484,6 +484,10 @@ cpfseq RCREG1 bra $+4 bra comm_identify ; Send firmware, serial, etc. + movlw "j" + cpfseq RCREG1 + bra $+4 + bra comm_hardware_descriptor ; Send hardware descriptor byte movlw "n" cpfseq RCREG1 bra $+4 @@ -724,6 +728,17 @@ bra comm_download_mode0 ; Done. +;----------------------------------------------------------------------------- +; Reply hardware descriptor byte +; + +comm_hardware_descriptor: + movlw "j" ; send echo + movwf TXREG1 + call rs232_wait_tx ; wait for UART + movff hardware_flag,TXREG1 + call rs232_wait_tx ; wait for UART + bra comm_download_mode0 ; Done. ;-----------------------------------------------------------------------------