aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTero Kontkanen <tero.k@granitedevices.fi>2017-05-08 18:33:26 +0300
committerGitHub <noreply@github.com>2017-05-08 18:33:26 +0300
commit92dd9d84b3c59cb2fbef4b32fc9d3720b09d0526 (patch)
treee254ea8eaf867764f6ceb6a54cbfe4b729c9f2b0
parent191597349718a006ec5c5e22ce19d57f52332c63 (diff)
parent91e90823cb19d1490d5223d2835f9064ea566c6f (diff)
downloadSimpleMotionV2-92dd9d84b3c59cb2fbef4b32fc9d3720b09d0526.tar.gz
SimpleMotionV2-92dd9d84b3c59cb2fbef4b32fc9d3720b09d0526.zip
Merge pull request #4 from oswjk/fix-types
Fix wrong handles being passed to smBDRead in simplemotion.c
-rw-r--r--simplemotion.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/simplemotion.c b/simplemotion.c
index 9a0b3fb..606eda0 100644
--- a/simplemotion.c
+++ b/simplemotion.c
@@ -34,7 +34,7 @@ SM_STATUS smReceiveReturnPacket( smbus bushandle );
typedef struct SM_BUS_
{
- smint8 bdHandle;
+ smbusdevicehandle bdHandle;
smbool opened;
enum RecvState recv_state,recv_state_next;
@@ -420,7 +420,7 @@ SM_STATUS smReceiveErrorHandler( smbus handle, smbool flushrx )
smbool success;
do{
smuint8 rx;
- success=smBDRead(handle,&rx);
+ success=smBDRead(smBus[handle].bdHandle,&rx);
}while(success==smtrue);
}
smResetSM485variables(handle);
@@ -644,7 +644,7 @@ SM_STATUS smReceiveReturnPacket( smbus bushandle )
smuint8 ret;
SM_STATUS stat;
- smbool succ=smBDRead(bushandle,&ret);
+ smbool succ=smBDRead(smBus[bushandle].bdHandle,&ret);
if(succ==smfalse)
{