Revision: 1141
Author: jsuijs
Date: Sun Aug 2 09:50:44 2009
Log: check/recovery of overrun in i2c slave lib
http://code.google.com/p/jallib/source/detail?r=1141
Modified:
/trunk/include/peripheral/i2c/i2c_hw_slave_isr.jal
=======================================
--- /trunk/include/peripheral/i2c/i2c_hw_slave_isr.jal Mon Jul 27 14:40:40
2009
+++ /trunk/include/peripheral/i2c/i2c_hw_slave_isr.jal Sun Aug 2 09:50:44
2009
@@ -62,6 +62,15 @@
if(defined(i2c_debug) == true) then
; queue01_nb = "*"
; print_byte_hex(queue01_nb, tmpstat)
+ queue01_nb = "#"
+ print_byte_hex(queue01_nb, sspcon)
+ end if
+
+ ; check for overflow
+ if (SSPCON_SSPOV) then
+ var byte _trash = i2c_hw_slave_read_i2c()
+ _trash = i2c_hw_slave_read_i2c()
+ SSPCON_SSPOV = false
end if
-- if this constant is defined and true, call start & stop handlers.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---