aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTero Kontkanen <tero.k@granitedevices.com>2017-08-23 14:43:19 +0300
committerTero Kontkanen <tero.k@granitedevices.com>2017-08-23 14:43:19 +0300
commit4176d9358a526ff207bb5f4d127f4143a632d748 (patch)
tree915a5596c632256ab77d5dc42236644307ea3b66
parentf5bd9539db2202e2677fd119f5c153edb2f51819 (diff)
downloadSimpleMotionV2-4176d9358a526ff207bb5f4d127f4143a632d748.tar.gz
SimpleMotionV2-4176d9358a526ff207bb5f4d127f4143a632d748.zip
Fix warnings on macOS & bump library version to 0x20500
-rw-r--r--SimpleMotionV2.pri2
-rw-r--r--devicedeployment.c2
-rw-r--r--devicedeployment.h4
-rw-r--r--drivers/tcpip/tcpclient.c1
-rw-r--r--simplemotion_private.h16
5 files changed, 13 insertions, 12 deletions
diff --git a/SimpleMotionV2.pri b/SimpleMotionV2.pri
index 5f1b8e4..304d404 100644
--- a/SimpleMotionV2.pri
+++ b/SimpleMotionV2.pri
@@ -19,7 +19,7 @@ HEADERS += $$PWD/simplemotion_private.h\
greaterThan(SUPPORT_FTDI_D2XX_DRIVER, 0+) {
SOURCES += $$PWD/drivers/ftdi_d2xx/sm_d2xx.c
HEADERS += $$PWD/drivers/ftdi_d2xx/sm_d2xx.c
- macx:LIBS += $$PWD/drivers/ftdi_d2xx/third_party/osx/libftd2xx.a #mac will needs insetalling some FTDI helper tool & reboot to make port open to work. see d2xx downloads page from ftdi.
+ macx:LIBS += $$PWD/drivers/ftdi_d2xx/third_party/osx/libftd2xx.a -framework CoreFoundation #mac will needs insetalling some FTDI helper tool & reboot to make port open to work. see d2xx downloads page from ftdi.
win32:LIBS += $$PWD/drivers/ftdi_d2xx/third_party/win_32bit/ftd2xx.lib
linux:LIBS += #tbd
DEFINES += FTDI_D2XX_SUPPORT
diff --git a/devicedeployment.c b/devicedeployment.c
index 4b5a50e..c832575 100644
--- a/devicedeployment.c
+++ b/devicedeployment.c
@@ -667,7 +667,7 @@ FirmwareUploadStatus smFirmwareUploadFromBuffer( const smbus smhandle, const int
}
if(i==256)//DFU device not found
- return abortFWUpload(CFGConnectingDFUModeFailed,&state,400);//setting DFU mode failed
+ return abortFWUpload(FWConnectingDFUModeFailed,&state,400);//setting DFU mode failed
progress=3;
}
diff --git a/devicedeployment.h b/devicedeployment.h
index 60f1a69..f9cfaa1 100644
--- a/devicedeployment.h
+++ b/devicedeployment.h
@@ -41,7 +41,8 @@ typedef enum
FWIncompatibleFW=-3,
FWConnectionLoss=-4,
FWUnsupportedTargetDevice=-5,
- FWFileNotReadable=-6
+ FWFileNotReadable=-6,
+ FWConnectingDFUModeFailed=-7
} FirmwareUploadStatus;
/**
@@ -68,7 +69,6 @@ typedef enum
CFGComplete=100,
CFGInvalidFile=-1,
CFGCommunicationError=-2,
- CFGConnectingDFUModeFailed=-3,
CFGIncompatibleFW=-4,
CFGUnsupportedTargetDevice=-5,
CFGUnableToOpenFile=-6
diff --git a/drivers/tcpip/tcpclient.c b/drivers/tcpip/tcpclient.c
index 458b77a..2b0620c 100644
--- a/drivers/tcpip/tcpclient.c
+++ b/drivers/tcpip/tcpclient.c
@@ -2,6 +2,7 @@
#include "tcpclient.h"
#include <stdio.h>
#include <ctype.h>
+#include <string.h>
#if defined(_WIN32)
#if defined(CM_NONE)
diff --git a/simplemotion_private.h b/simplemotion_private.h
index 67128b7..676fe9f 100644
--- a/simplemotion_private.h
+++ b/simplemotion_private.h
@@ -9,7 +9,7 @@
#include "busdevice.h"
#include <stdio.h>
-#define SM_VERSION 0x020100
+#define SM_VERSION 0x020500
//max number of simultaneously opened buses. change this and recompiple SMlib if
//necessary (to increase channels or reduce to save memory)
#define SM_MAX_BUSES 10
@@ -58,7 +58,7 @@ typedef struct {
* ID=3 reserved
*/
long param :30; //LSB 30 bits
- long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
+ unsigned long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
} PACKED SMPayloadCommand32;
typedef struct {
@@ -68,7 +68,7 @@ typedef struct {
* ID=3 reserved
*/
long param :14; //LSB 30 bits
- long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
+ unsigned long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
} PACKED SMPayloadCommand16;
typedef struct {
@@ -78,7 +78,7 @@ typedef struct {
* ID=3 reserved
*/
long param :22; //MSB 30 bits
- long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
+ unsigned long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
} PACKED SMPayloadCommand24;
//SM payload command return data structure
@@ -89,7 +89,7 @@ typedef struct {
* ID=3 reserved
*/
long retData: 30; //LSB 30 bits
- long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
+ unsigned long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
} PACKED SMPayloadCommandRet32;
//SM payload command return data structure
@@ -100,7 +100,7 @@ typedef struct {
* ID=3 reserved
*/
long retData: 22; //LSB 30 bits
- long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
+ unsigned long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
} PACKED SMPayloadCommandRet24;
//SM payload command return data structure
@@ -111,7 +111,7 @@ typedef struct {
* ID=3 reserved
*/
long retData: 14; //LSB 30 bits
- long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
+ unsigned long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
} PACKED SMPayloadCommandRet16;
//SM payload command return data structure
@@ -122,7 +122,7 @@ typedef struct {
* ID=3 reserved
*/
long retData: 6; //LSB 30 bits
- long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
+ unsigned long ID:2; //MSB 2 bits. when serailzied to bytestream byte4 must be transmitted first to contain ID
} PACKED SMPayloadCommandRet8;
/*Workaround to have packed structs that compile on GCC and MSVC*/