diff src/i2c.asm @ 627:bf5fee575701

minor cleanup, reset rx circuity
author heinrichsweikamp
date Sun, 30 Jun 2019 23:22:32 +0200
parents 7bdcc591196c
children cd58f7fc86db
line wrap: on
line diff
--- a/src/i2c.asm	Thu Jun 13 10:07:55 2019 +0200
+++ b/src/i2c.asm	Sun Jun 30 23:22:32 2019 +0200
@@ -765,10 +765,12 @@
 	btfss	SSP1CON2,ACKSTAT			; checks for ACK bit from slave
 	return
 I2CFail:
+	bsf		active_reset_ostc_rx		; RESET RX circuitry (Which may be the cause for the hang up)
 	rcall	I2CReset					; I2C Reset
 	bcf		PIR1,SSP1IF
 	clrf	i2c_temp1
 	bsf		i2c_error_flag				; set error flag
+	bcf		active_reset_ostc_rx		; release RESET from RX circuitry
 	return
 
 I2CReset:								; something went wrong (slave holds SDA low?)