From 7f4861c9ea91d8e4afa92d6451d86c26c3133e66 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 27 Sep 2009 12:23:23 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1187 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/platforms/AT91SAM7X/mac_lld.c | 4 ++-- 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