From d9714b556703561a0abcbe71970b1cd6922168a6 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 21 Jul 2012 21:23:18 +0000 Subject: Use NuttX types in FreeModBus port; Add FreeModBus demo at apps/examples/modbus; Add new termios APIs git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4964 42af7a65-404d-4744-a932-0658087f49c3 --- apps/modbus/nuttx/porttimer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'apps/modbus/nuttx/porttimer.c') 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; } -- cgit v1.2.3