Author: jsuijs
Date: Sun Jan 4 03:45:37 2009
New Revision: 721
Modified:
trunk/include/peripheral/i2c/i2c_level1.jal
Log:
give compile error if txbuffer is too small
Modified: trunk/include/peripheral/i2c/i2c_level1.jal
==============================================================================
--- trunk/include/peripheral/i2c/i2c_level1.jal (original)
+++ trunk/include/peripheral/i2c/i2c_level1.jal Sun Jan 4 03:45:37 2009
@@ -11,6 +11,10 @@
-- TODO:
--
+if (count(i2c_tx_buffer) < 2) then
+ pragma error -- "Please make i2c_tx_buffer[] at least 2 long"
+end if
+
--
-----------------------------------------------------------------------------
-- i2c_send_receive - send a string to an i2c slave and receive bytes back
--
-----------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---