summaryrefslogtreecommitdiffstats
path: root/api/i2c_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/i2c_driver.h')
-rw-r--r--api/i2c_driver.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/api/i2c_driver.h b/api/i2c_driver.h
new file mode 100644
index 0000000..7826dce
--- /dev/null
+++ b/api/i2c_driver.h
@@ -0,0 +1,21 @@
+//---------------------------------------------------------------------------
+
+#ifndef i2c_driverH
+#define i2c_driverH
+
+// Sends data bytes to xc4000 via I2C starting with
+// bytes_to_send[0] and ending with bytes_to_send[nb_bytes_to_send-1]
+int xc_send_i2c_data(unsigned char *bytes_to_send, int nb_bytes_to_send);
+
+// Reads data bytes from xc4000 via I2C starting with
+// bytes_received[0] and ending with bytes_received[nb_bytes_to_receive-1]
+int xc_read_i2c_data(unsigned char *bytes_received, int nb_bytes_to_receive);
+
+// Does hardware reset
+int xc_reset();
+
+// Waits for wait_ms milliseconds
+void xc_wait(int wait_ms);
+
+//---------------------------------------------------------------------------
+#endif