Julia DESMAZES / Mbed 2 deprecated Hexapode

Dependencies:   mbed BLE_API X_NUCLEO_IDB0XA1 MODSERIAL

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SSC-32.h Source File

SSC-32.h

00001 #ifndef SSC_32_H
00002 #define SSC_32_H
00003 #include "mbed.h"
00004 #include "Motors.h"
00005 #include <queue>
00006 #define SSC_32_RX PA_2
00007 #define SSC_32_TX PA_3
00008 using namespace std;
00009 
00010 struct data32{
00011     data32(char i, int v);
00012     char id; //motor index
00013     int value;
00014 };
00015 class SSC_32 
00016 {
00017     public:
00018     SSC_32();
00019     void send(int dt_ms);
00020     void close();
00021     void add(int leg, int val);
00022     void add(char leg, int val,Motors* cible);//ont le rajoute au stack
00023     private: 
00024     ~SSC_32();
00025     int old_val[18];
00026     char *real_id[18];
00027     Serial *serial;
00028     queue <data32*> buffer;
00029     };
00030 
00031 #endif