ringBuffer26

Dependencies:   mbed

Revision:
0:333434a8611b
Child:
1:0cb065f9d55a
diff -r 000000000000 -r 333434a8611b MotorControl.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MotorControl.h	Fri Mar 20 10:54:58 2020 +0000
@@ -0,0 +1,36 @@
+#ifndef MOTORCONTROL_H
+#define MOTORCONTROL_H
+
+#include "mbed.h"
+#include <string> 
+
+#define DEBUG_MOTOR
+
+#define BUFFER_SIZE  32
+#define MESSAGE 20
+
+#define REV_MAX_STEPS -2147483648
+#define FWD_MAX_STEPS 2147483648
+#define DEBUG
+ 
+
+extern RawSerial mc_usart;// this will be USART6 for motor control 
+extern const string rxMsgTable[];
+extern char rxMsgStore[];//received local message store
+extern char mc_Tx_Buffer[];//transmitted message buffer 
+extern volatile char mc_Rx_Buffer[];//received message buffer
+extern volatile unsigned char mc_Rx_Rd_Ptr;//circulare buffer read pointer
+extern volatile unsigned char mc_Rx_Wr_Ptr;//circulare buffer write pointer
+extern unsigned int rx_int;//received integer / character
+
+//unsigned char i; 
+extern bool msgRecFlag;//message received flag 
+
+void motMsg_RX_ISR(void);
+bool getMotMsg(char * msgArray);
+void motMsgDecode(unsigned int rxMsgTable[], unsigned int rxMsg[]);void clrRxMsg(char array[]);
+bool moveMot(uint8_t par1, int32_t par2);
+
+
+
+#endif
\ No newline at end of file