git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1198 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2009-10-01 18:24:27 +00:00
parent a1892b59a9
commit 48cf30f8ab
1 changed files with 2 additions and 7 deletions

View File

@ -27,11 +27,6 @@
#include <ch.h>
#include <mac.h>
/**
* @brief Transmit descriptors counter semaphore.
*/
static Semaphore tdsem, rdsem;
/**
* @brief MAC Driver initialization.
*/
@ -96,7 +91,7 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp,
(time > 0)) {
chSysLock();
systime_t now = chTimeNow();
if ((msg = chSemWaitTimeoutS(&tdsem, time)) == RDY_TIMEOUT)
if ((msg = chSemWaitTimeoutS(&macp->md_tdsem, time)) == RDY_TIMEOUT)
break;
if (time != TIME_INFINITE)
time -= (chTimeNow() - now);
@ -142,7 +137,7 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp,
(time > 0)) {
chSysLock();
systime_t now = chTimeNow();
if ((msg = chSemWaitTimeoutS(&rdsem, time)) == RDY_TIMEOUT)
if ((msg = chSemWaitTimeoutS(&macp->md_rdsem, time)) == RDY_TIMEOUT)
break;
if (time != TIME_INFINITE)
time -= (chTimeNow() - now);