drivers/net/slip.c: Fix another compilation error
This commit is contained in:
parent
3a109315ed
commit
15db2a45a4
@ -10776,7 +10776,7 @@
|
|||||||
Based comments from Anton D. Kachalov (2015-07-29).
|
Based comments from Anton D. Kachalov (2015-07-29).
|
||||||
* STM32 F4: Add DMA support to the ADC driver for STM32 F4. From
|
* STM32 F4: Add DMA support to the ADC driver for STM32 F4. From
|
||||||
Max Kriegler (2015-07-30).
|
Max Kriegler (2015-07-30).
|
||||||
* sem_tickwait(): Added this furnction for internaluse within the
|
* sem_tickwait(): Added this function for internal use within the
|
||||||
OS. It is a non-standard but more efficient version of sem_timedwait()
|
OS. It is a non-standard but more efficient version of sem_timedwait()
|
||||||
for use in higher performance device drviers (2015-08-01).
|
for use in higher performance device drivers (2015-08-01).
|
||||||
|
* drivers/net/slip.c: Fix another compilation error (2015-08-02).
|
||||||
|
2
arch
2
arch
@ -1 +1 @@
|
|||||||
Subproject commit 098a35f7dd39b6e4546e2b490f18f7d71a338e23
|
Subproject commit d99e8ced38440ef61bebfd1507269b9072aba355
|
@ -405,8 +405,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv)
|
|||||||
* callback from devif_poll(). devif_poll() may be called:
|
* callback from devif_poll(). devif_poll() may be called:
|
||||||
*
|
*
|
||||||
* 1. When the preceding TX packet send is complete, or
|
* 1. When the preceding TX packet send is complete, or
|
||||||
* 2. When the preceding TX packet send times o ]ut and the interface is reset
|
* 2. During normal periodic polling
|
||||||
* 3. During normal TX polling
|
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* dev - Reference to the NuttX driver state structure
|
* dev - Reference to the NuttX driver state structure
|
||||||
@ -506,16 +505,22 @@ static void slip_txtask(int argc, FAR char *argv[])
|
|||||||
flags = net_lock();
|
flags = net_lock();
|
||||||
priv->dev.d_buf = priv->txbuf;
|
priv->dev.d_buf = priv->txbuf;
|
||||||
|
|
||||||
|
/* Has a half second elapsed since the last timer poll? */
|
||||||
|
|
||||||
msec_now = clock_systimer() * MSEC_PER_TICK;
|
msec_now = clock_systimer() * MSEC_PER_TICK;
|
||||||
hsec = (unsigned int)(msec_now - msec_start) / (MSEC_PER_SEC / 2);
|
hsec = (unsigned int)(msec_now - msec_start) / (MSEC_PER_SEC / 2);
|
||||||
if (hsec)
|
if (hsec)
|
||||||
{
|
{
|
||||||
|
/* Yes, perform the timer poll */
|
||||||
|
|
||||||
(void)devif_timer(&priv->dev, slip_txpoll, hsec);
|
(void)devif_timer(&priv->dev, slip_txpoll, hsec);
|
||||||
msec_start += hsec * (MSEC_PER_SEC / 2);
|
msec_start += hsec * (MSEC_PER_SEC / 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(void)devif_poll(&priv->dev, slip_uiptxpoll);
|
/* No, perform the normal TX poll */
|
||||||
|
|
||||||
|
(void)devif_poll(&priv->dev, slip_txpoll);
|
||||||
}
|
}
|
||||||
|
|
||||||
net_unlock(flags);
|
net_unlock(flags);
|
||||||
|
@ -136,7 +136,7 @@ int sem_tickwait(FAR sem_t *sem, uint32_t start, uint32_t delay)
|
|||||||
/* Adjust the delay for any time since the delay was calculated */
|
/* Adjust the delay for any time since the delay was calculated */
|
||||||
|
|
||||||
elapsed = clock_systimer() - start;
|
elapsed = clock_systimer() - start;
|
||||||
if (elapsed >= (UINT32_MAX / 2) || elapsed >= delay)
|
if (/*elapsed >= (UINT32_MAX / 2) || */ elapsed >= delay)
|
||||||
{
|
{
|
||||||
ret = -ETIMEDOUT;
|
ret = -ETIMEDOUT;
|
||||||
goto errout_with_irqdisabled;
|
goto errout_with_irqdisabled;
|
||||||
|
Loading…
Reference in New Issue
Block a user