Nathaniel Honka / Mbed 2 deprecated Motion-Control

Dependencies:   FiniteStateMachine HipControl Knee LinearBlend1 LocalFileSystem_Read dataComm hapticFeedback initExoVars mbed Blend_Generator Brad_poly_gait Gait_Generator MM_gait Encoders IMUdriver

Fork of Motion Control by HEL's Angels

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers dataBedComm.cpp Source File

dataBedComm.cpp

00001 #include "mbed.h"
00002 #include "initExoVars.h"
00003 
00004 ////////////////////////////////////////////////////////
00005 // Databed comm stuff
00006 ////////////////////////////////////////////////////////
00007 
00008 short *sendData(short dataOut[], int length, short dataIn[])
00009 {
00010     for(int ii=0; ii<length; ii++) {
00011         DB_cs=0;
00012         dataIn[ii]=dataBedSPI.write(dataOut[ii]);
00013         DB_cs=1;
00014         wait_us(4);
00015     }
00016     return dataIn;
00017 }