diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-31 12:26:18 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-31 12:26:18 -0600 |
commit | 78dbcb3debf28d9a87455f9a6c552ed35efb63a9 (patch) | |
tree | 6b551b3558903829c08705b5f633ca5857956207 | |
parent | 8dabb6f814c2158d12434401d6010eb51d66ebbd (diff) | |
download | px4-nuttx-78dbcb3debf28d9a87455f9a6c552ed35efb63a9.tar.gz px4-nuttx-78dbcb3debf28d9a87455f9a6c552ed35efb63a9.tar.bz2 px4-nuttx-78dbcb3debf28d9a87455f9a6c552ed35efb63a9.zip |
Minor updated to Ethernet driver skeleton
-rw-r--r-- | nuttx/drivers/net/skeleton.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nuttx/drivers/net/skeleton.c b/nuttx/drivers/net/skeleton.c index 28d2a3f6d..33fbacb5b 100644 --- a/nuttx/drivers/net/skeleton.c +++ b/nuttx/drivers/net/skeleton.c @@ -447,6 +447,17 @@ static int skel_interrupt(int irq, FAR void *context) * condition here. */ + /* TODO: Determine if a TX transfer just completed */ + + { + /* If a TX transfer just completed, then cancel the TX timeout so + * there will be do race condition between any subsequent timeout + * expiration and the deferred interrupt processing. + */ + + wd_cancel(skel->sk_txtimeout); + } + /* Cancel any pending poll work */ work_cancel(HPWORK, skel->sk_work); @@ -454,6 +465,7 @@ static int skel_interrupt(int irq, FAR void *context) /* Schedule to perform the interrupt processing on the worker thread. */ work_queue(HPWORK, &skel->sk_work, skel_interrupt_work, skel, 0); + #else /* Process the interrupt now */ |