ringBuffer26

Dependencies:   mbed

Committer:
Picmon
Date:
Fri Mar 20 10:54:58 2020 +0000
Revision:
0:333434a8611b
Child:
1:0cb065f9d55a
motor controller 200320A

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Picmon 0:333434a8611b 1 #ifndef MOTORCONTROL_H
Picmon 0:333434a8611b 2 #define MOTORCONTROL_H
Picmon 0:333434a8611b 3
Picmon 0:333434a8611b 4 #include "mbed.h"
Picmon 0:333434a8611b 5 #include <string>
Picmon 0:333434a8611b 6
Picmon 0:333434a8611b 7 #define DEBUG_MOTOR
Picmon 0:333434a8611b 8
Picmon 0:333434a8611b 9 #define BUFFER_SIZE 32
Picmon 0:333434a8611b 10 #define MESSAGE 20
Picmon 0:333434a8611b 11
Picmon 0:333434a8611b 12 #define REV_MAX_STEPS -2147483648
Picmon 0:333434a8611b 13 #define FWD_MAX_STEPS 2147483648
Picmon 0:333434a8611b 14 #define DEBUG
Picmon 0:333434a8611b 15
Picmon 0:333434a8611b 16
Picmon 0:333434a8611b 17 extern RawSerial mc_usart;// this will be USART6 for motor control
Picmon 0:333434a8611b 18 extern const string rxMsgTable[];
Picmon 0:333434a8611b 19 extern char rxMsgStore[];//received local message store
Picmon 0:333434a8611b 20 extern char mc_Tx_Buffer[];//transmitted message buffer
Picmon 0:333434a8611b 21 extern volatile char mc_Rx_Buffer[];//received message buffer
Picmon 0:333434a8611b 22 extern volatile unsigned char mc_Rx_Rd_Ptr;//circulare buffer read pointer
Picmon 0:333434a8611b 23 extern volatile unsigned char mc_Rx_Wr_Ptr;//circulare buffer write pointer
Picmon 0:333434a8611b 24 extern unsigned int rx_int;//received integer / character
Picmon 0:333434a8611b 25
Picmon 0:333434a8611b 26 //unsigned char i;
Picmon 0:333434a8611b 27 extern bool msgRecFlag;//message received flag
Picmon 0:333434a8611b 28
Picmon 0:333434a8611b 29 void motMsg_RX_ISR(void);
Picmon 0:333434a8611b 30 bool getMotMsg(char * msgArray);
Picmon 0:333434a8611b 31 void motMsgDecode(unsigned int rxMsgTable[], unsigned int rxMsg[]);void clrRxMsg(char array[]);
Picmon 0:333434a8611b 32 bool moveMot(uint8_t par1, int32_t par2);
Picmon 0:333434a8611b 33
Picmon 0:333434a8611b 34
Picmon 0:333434a8611b 35
Picmon 0:333434a8611b 36 #endif