aboutsummaryrefslogtreecommitdiff
path: root/simplemotion.c
diff options
context:
space:
mode:
authorTero K <tero.k@granitedevices.fi>2016-07-31 14:31:42 +0300
committerTero K <tero.k@granitedevices.fi>2016-07-31 14:31:42 +0300
commiteff5049a771de22826dd610fe923807a696dcf61 (patch)
tree464a83e3a0c68bd8daf3f82ad528a5f27d584718 /simplemotion.c
parent81a6bba3d855f77b7185b99f77250d8572127d75 (diff)
downloadSimpleMotionV2-feature/FastBufferedMotionProtocol.tar.gz
SimpleMotionV2-feature/FastBufferedMotionProtocol.zip
Fast buffered motion protocol under development (work in progress, not working at the moment)feature/FastBufferedMotionProtocol
Diffstat (limited to 'simplemotion.c')
-rw-r--r--simplemotion.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/simplemotion.c b/simplemotion.c
index cea0238..3d12322 100644
--- a/simplemotion.c
+++ b/simplemotion.c
@@ -256,6 +256,9 @@ char *cmdidToStr(smuint8 cmdid )
case SMCMD_GET_CLOCK_RET :str="SMCMD_GET_CLOCK_RET";break;
case SMCMD_FAST_UPDATE_CYCLE:str="SMCMD_FAST_UPDATE_CYCLE";break;
case SMCMD_FAST_UPDATE_CYCLE_RET:str="SMCMD_FAST_UPDATE_CYCLE_RET";break;
+ case SMCMD_FAST_BUFFERED_CMD:str="SMCMD_FAST_BUFFERED_CMD";break;
+ case SMCMD_FAST_BUFFERED_CMD_RET:str="SMCMD_FAST_BUFFERED_CMD_RET";break;
+ case SMCMD_FAST_BUFFERED_CMD_RET_SHORT:str="SMCMD_FAST_BUFFERED_CMD_RET_SHORT";break;
default: str="unknown cmdid";break;
}
//puts(str);
@@ -418,7 +421,6 @@ SM_STATUS smReceiveErrorHandler( smbus handle, smbool flushrx )
SM_STATUS smAppendSMCommandToQueue( smbus handle, int smpCmdType,smint32 paramvalue )
{
- smuint8 txbyte;
int cmdlength;
//check if bus handle is valid & opened
@@ -452,12 +454,6 @@ SM_STATUS smAppendSMCommandToQueue( smbus handle, int smpCmdType,smint32 paramva
SMPayloadCommand16 newcmd;
newcmd.ID=SMPCMD_SETPARAMADDR;
newcmd.param=paramvalue;
-
- // bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes, 5);
- // bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes, 6);
- /*
-FIXME
- ei toimi, menee vaa nollaa*/
bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes++, ((unsigned char*)&newcmd)[1]);
bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes++, ((unsigned char*)&newcmd)[0]);
}
@@ -945,3 +941,11 @@ void resetCumulativeStatus( const smbus handle )
smBus[handle].cumulativeSmStatus=0;
}
+//fast method for buffered motion stream, this provides limited return data and feeds all drives simultaneously
+SM_STATUS smTransmitAndReceiveFastBufferedCommand( const smbus handle, const smaddr nodeAddress, smint16 &clockOut, smint16 &bufferfreeOut )
+{
+
+
+
+}
+