summaryrefslogtreecommitdiff
path: root/apps/modbus/nuttx/porttimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/modbus/nuttx/porttimer.c')
-rw-r--r--apps/modbus/nuttx/porttimer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/modbus/nuttx/porttimer.c b/apps/modbus/nuttx/porttimer.c
index 3ff2d78ae..d688c4f52 100644
--- a/apps/modbus/nuttx/porttimer.c
+++ b/apps/modbus/nuttx/porttimer.c
@@ -37,14 +37,14 @@
/* ----------------------- Defines ------------------------------------------*/
/* ----------------------- Static variables ---------------------------------*/
-ULONG ulTimeOut;
-BOOL bTimeoutEnable;
+uint32_t ulTimeOut;
+bool bTimeoutEnable;
static struct timeval xTimeLast;
/* ----------------------- Start implementation -----------------------------*/
-BOOL
-xMBPortTimersInit( USHORT usTim1Timerout50us )
+bool
+xMBPortTimersInit( uint16_t usTim1Timerout50us )
{
ulTimeOut = usTim1Timerout50us / 20U;
if( ulTimeOut == 0 )
@@ -62,7 +62,7 @@ xMBPortTimersClose( )
void
vMBPortTimerPoll( )
{
- ULONG ulDeltaMS;
+ uint32_t ulDeltaMS;
struct timeval xTimeCur;
/* Timers are called from the serial layer because we have no high
@@ -79,7 +79,7 @@ vMBPortTimerPoll( )
( xTimeCur.tv_usec - xTimeLast.tv_usec ) * 1000L;
if( ulDeltaMS > ulTimeOut )
{
- bTimeoutEnable = FALSE;
+ bTimeoutEnable = false;
( void )pxMBPortCBTimerExpired( );
}
}
@@ -92,11 +92,11 @@ vMBPortTimersEnable( )
int res = gettimeofday( &xTimeLast, NULL );
ASSERT( res == 0 );
- bTimeoutEnable = TRUE;
+ bTimeoutEnable = true;
}
void
vMBPortTimersDisable( )
{
- bTimeoutEnable = FALSE;
+ bTimeoutEnable = false;
}