diff src/eeprom_rs232.asm @ 378:7faa688db105

BUGFIX: BLE timings for MAC issues
author heinrichsweikamp
date Tue, 15 Sep 2015 18:11:08 +0200
parents 2fd258596af0
children 3c55627d5f8f
line wrap: on
line diff
--- a/src/eeprom_rs232.asm	Thu Sep 10 13:05:26 2015 +0200
+++ b/src/eeprom_rs232.asm	Tue Sep 15 18:11:08 2015 +0200
@@ -194,23 +194,22 @@
 	global	rs232_get_byte
 rs232_get_byte:
 	bcf		rs232_recieve_overflow		; clear flag
-	clrf 	uart1_temp
+    movlw   .10
+	movwf   uart1_temp
 	clrf 	uart2_temp
+    clrf    uart3_temp
 rs232_get_byte2:
 	btfsc 	PIR1,RCIF		; data arrived?
-    return
-	btfsc 	PIR1,RCIF		; data arrived?
-    return
-	btfsc 	PIR1,RCIF		; data arrived?
-    return
-	btfsc 	PIR1,RCIF		; data arrived?
-    return
+    bra     rs232_get_byte3 ; Yes
+	decfsz 	uart3_temp,F
+	bra 	rs232_get_byte2
 	decfsz 	uart2_temp,F
-	bra 	rs232_get_byte2
+	bra		rs232_get_byte2
 	decfsz 	uart1_temp,F
 	bra		rs232_get_byte2
 						; timeout occoured (about 40ms)
 	bsf		rs232_recieve_overflow		; set flag
+rs232_get_byte3:
 	bcf		RCSTA1,CREN		; Clear receiver status
 	bsf		RCSTA1,CREN
 	return				; and return anyway