diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-09-27 12:23:23 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-09-27 12:23:23 +0000 |
commit | 7f4861c9ea91d8e4afa92d6451d86c26c3133e66 (patch) | |
tree | 2216cf9cec5e893b2897e2cbf9491a6974ffea17 | |
parent | 38c94f357079127077ad92a1f115081474f69db3 (diff) | |
download | ChibiOS-7f4861c9ea91d8e4afa92d6451d86c26c3133e66.tar.gz ChibiOS-7f4861c9ea91d8e4afa92d6451d86c26c3133e66.tar.bz2 ChibiOS-7f4861c9ea91d8e4afa92d6451d86c26c3133e66.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1187 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/io/platforms/AT91SAM7X/mac_lld.c | 4 | ||||
-rw-r--r-- | os/io/platforms/AT91SAM7X/mac_lld.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/os/io/platforms/AT91SAM7X/mac_lld.c b/os/io/platforms/AT91SAM7X/mac_lld.c index e770e0474..55874bab8 100644 --- a/os/io/platforms/AT91SAM7X/mac_lld.c +++ b/os/io/platforms/AT91SAM7X/mac_lld.c @@ -269,7 +269,7 @@ void mac_lld_release_transmit_descriptor(MACDriver *macp, */
uint8_t *mac_lld_get_transmit_buffer(MACTransmitDescriptor *tdp) {
- return NULL;
+ return (uint8_t *)(tdp->w1 & W1_T_ADDRESS_MASK);
}
/**
@@ -307,7 +307,7 @@ void mac_lld_release_receive_descriptor(MACDriver *macp, */
uint8_t *mac_lld_get_receive_buffer(MACReceiveDescriptor *rdp) {
- return NULL;
+ return (uint8_t *)(rdp->w1 & W1_R_ADDRESS_MASK);
}
/** @} */
diff --git a/os/io/platforms/AT91SAM7X/mac_lld.h b/os/io/platforms/AT91SAM7X/mac_lld.h index c854c0029..a3ba3decd 100644 --- a/os/io/platforms/AT91SAM7X/mac_lld.h +++ b/os/io/platforms/AT91SAM7X/mac_lld.h @@ -76,6 +76,8 @@ #define W2_R_MULTICAST_MATCH 0x40000000
#define W2_R_BROADCAST_DETECTED 0x80000000
+#define W1_T_ADDRESS_MASK 0xFFFFFFFF
+
#define W2_T_LENGTH_MASK 0x000007FF
#define W2_T_LOCKED 0x00000800 /* Not an EMAC flag, used by the driver */
#define W2_T_RFU1 0x00003000
|