aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/lfkeyboards/TWIlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/lfkeyboards/TWIlib.c')
-rw-r--r--keyboards/lfkeyboards/TWIlib.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/keyboards/lfkeyboards/TWIlib.c b/keyboards/lfkeyboards/TWIlib.c
index abb12cc87..dc4fbf016 100644
--- a/keyboards/lfkeyboards/TWIlib.c
+++ b/keyboards/lfkeyboards/TWIlib.c
@@ -11,6 +11,19 @@
#include "util/delay.h"
#include "print.h"
+// Global transmit buffer
+volatile uint8_t *TWITransmitBuffer;
+// Global receive buffer
+volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN];
+// Buffer indexes
+volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time.
+int RXBuffIndex; // Current index in the receive buffer
+// Buffer lengths
+int TXBuffLen; // The total length of the transmit buffer
+int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN)
+
+TWIInfoStruct TWIInfo;
+
void TWIInit()
{
TWIInfo.mode = Ready;