diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-02-23 01:05:32 +0200 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-02-23 01:05:32 +0200 |
| commit | d303b5967b4351af84e6b7faf46970b5c539ec01 (patch) | |
| tree | 73080e2d843aa2febc663a102e3c79a648b8630b | |
| parent | ef90858cab265f2c5e19f86825a5d92154e7a0e0 (diff) | |
| download | SimpleMotionV2-d303b5967b4351af84e6b7faf46970b5c539ec01.tar.gz SimpleMotionV2-d303b5967b4351af84e6b7faf46970b5c539ec01.zip | |
Got rid of various compiler warnings
| -rw-r--r-- | busdevice.h | 2 | ||||
| -rw-r--r-- | simplemotion.c | 6 | ||||
| -rw-r--r-- | simplemotion.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/busdevice.h b/busdevice.h index 580cda8..6a02a26 100644 --- a/busdevice.h +++ b/busdevice.h @@ -7,7 +7,7 @@ #include "simplemotion.h" #include "simplemotion_private.h" -typedef smint8 smbusdevicehandle; +typedef smint16 smbusdevicehandle; #define SM_BAUDRATE 460800 diff --git a/simplemotion.c b/simplemotion.c index 78059ab..4ef9b00 100644 --- a/simplemotion.c +++ b/simplemotion.c @@ -308,7 +308,6 @@ smbool smTransmitBuffer( const smbus handle ) SM_STATUS smSendSMCMD( smbus handle, smuint8 cmdid, smuint8 addr, smuint8 datalen, smuint8 *cmddata )
{
int i;
- smuint8 data;
smuint16 sendcrc;
//check if bus handle is valid & opened
@@ -431,7 +430,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
@@ -951,10 +949,12 @@ SM_STATUS getCumulativeStatus( const smbus handle ) }
/** Reset cululative status so getCumultiveStatus returns 0 after calling this until one of the other functions are called*/
-void resetCumulativeStatus( const smbus handle )
+SM_STATUS resetCumulativeStatus( const smbus handle )
{
if(smIsHandleOpen(handle)==smfalse) return SM_ERR_NODEVICE;
smBus[handle].cumulativeSmStatus=0;
+
+ return SM_OK;
}
diff --git a/simplemotion.h b/simplemotion.h index 965512f..725d3dc 100644 --- a/simplemotion.h +++ b/simplemotion.h @@ -112,7 +112,7 @@ LIB void smSetDebugOutput( smVerbosityLevel level, FILE *stream ); /** This function returns all occurred SM_STATUS bits after smOpenBus or resetCumulativeStatus call*/
LIB SM_STATUS getCumulativeStatus( const smbus handle );
/** Reset cululative status so getCumultiveStatus returns 0 after calling this until one of the other functions are called*/
-LIB void resetCumulativeStatus( const smbus handle );
+LIB SM_STATUS resetCumulativeStatus( const smbus handle );
/** SMV2 Device communication functionss */
|
