From 7dc56301dd8388cdf60e0c3270ec99b403c6063f Mon Sep 17 00:00:00 2001 From: Tero Kontkanen Date: Fri, 7 Apr 2017 15:33:40 +0300 Subject: Switch using stdint.h types --- simplemotion.c | 2 +- simplemotion.h | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/simplemotion.c b/simplemotion.c index 9a0b3fb..d78e511 100644 --- a/simplemotion.c +++ b/simplemotion.c @@ -158,7 +158,7 @@ SM_STATUS smSetTimeout( smuint16 millsecs ) return SM_ERR_PARAMETER; } -unsigned long smGetVersion() +smuint32 smGetVersion() { return SM_VERSION; } diff --git a/simplemotion.h b/simplemotion.h index 725d3dc..dcf499d 100644 --- a/simplemotion.h +++ b/simplemotion.h @@ -17,6 +17,7 @@ #endif #include +#include #include "simplemotion_defs.h" @@ -38,13 +39,13 @@ extern "C"{ /////////////////////////////////////////////////////////////////////////////////////// //declare SM lib types typedef long smbus; -typedef unsigned long smuint32; -typedef unsigned short smuint16; -typedef unsigned char smuint8; -typedef long smint32; -typedef short smint16; -typedef char smint8; -typedef char smbool; +typedef uint32_t smuint32; +typedef uint16_t smuint16; +typedef uint8_t smuint8; +typedef int32_t smint32; +typedef int16_t smint16; +typedef int8_t smint8; +typedef int8_t smbool; #define smtrue 1 #define smfalse 0 typedef int SM_STATUS; -- cgit v1.2.3