From e9f3d4a56d10de933c9c22646a7b084ec3cff20f Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Fri, 24 Apr 2020 13:16:17 -0500 Subject: Add MORE stuff I forget to commit --- Lab6.X/circBuffer.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Lab6.X/circBuffer.c (limited to 'Lab6.X/circBuffer.c') diff --git a/Lab6.X/circBuffer.c b/Lab6.X/circBuffer.c new file mode 100644 index 0000000..d4d120f --- /dev/null +++ b/Lab6.X/circBuffer.c @@ -0,0 +1,28 @@ +#include "xc.h" +#include "circBuffer.h" +#define SIZE 1024 + +volatile unsigned int buffer[SIZE]; +int buffSize = 0, write = 0, read = 0; +void initBuffer(){ + int i; + for (i=0; i