aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTero Kontkanen <tero.k@granitedevices.com>2017-02-23 01:40:58 +0200
committerTero Kontkanen <tero.k@granitedevices.com>2017-02-23 01:40:58 +0200
commit260d52898737bc52e602a56f694931fc9e5c8fa2 (patch)
tree7f246812292fa296f84ce4abf5f3486ebe381957
parent2be57946f0ad4f8d94d461fcfa9a36efd99d1258 (diff)
downloadSimpleMotionV2-260d52898737bc52e602a56f694931fc9e5c8fa2.tar.gz
SimpleMotionV2-260d52898737bc52e602a56f694931fc9e5c8fa2.zip
Fix rest of the compiler warnings
-rw-r--r--pcserialport.c1
-rw-r--r--simplemotion.c9
2 files changed, 3 insertions, 7 deletions
diff --git a/pcserialport.c b/pcserialport.c
index ef33aa9..2b44add 100644
--- a/pcserialport.c
+++ b/pcserialport.c
@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <string.h>
smint32 serialPortOpen(const char * port_device_name, smint32 baudrate_bps)
{
diff --git a/simplemotion.c b/simplemotion.c
index 4ef9b00..9a0b3fb 100644
--- a/simplemotion.c
+++ b/simplemotion.c
@@ -1,3 +1,4 @@
+
//Copyright (c) Granite Devices Oy
#include <stdio.h>
@@ -463,12 +464,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]);
}
@@ -866,7 +861,7 @@ SM_STATUS smGetBufferClock( const smbus handle, const smaddr targetaddr, smuint1
if(stat!=SM_OK) return recordStatus(handle,stat); //maybe timeouted
if(clock!=NULL)
- *clock=bufget16bit(smBus[handle].recv_rsbuf,0);
+ memcpy(clock,smBus[handle].recv_rsbuf,sizeof(smuint16));
smBus[handle].recv_storepos=0;