diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-03-24 09:17:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-03-24 09:17:35 +0000 |
commit | 1d199e177e4c009aee0d165ac9033e6838c601a4 (patch) | |
tree | 7b099bfc68a3635c165d83d05a54d7dd0c914c46 /os | |
parent | 3f1cbf814e81930d859f43ea9e829e1702ce2f2d (diff) | |
download | ChibiOS-1d199e177e4c009aee0d165ac9033e6838c601a4.tar.gz ChibiOS-1d199e177e4c009aee0d165ac9033e6838c601a4.tar.bz2 ChibiOS-1d199e177e4c009aee0d165ac9033e6838c601a4.zip |
Checksum offload in STM32 MAC driver tested.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4054 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/platforms/STM32/mac_lld.c | 2 | ||||
-rw-r--r-- | os/hal/platforms/STM32/mac_lld.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/mac_lld.c b/os/hal/platforms/STM32/mac_lld.c index 2918bb434..72fb2a004 100644 --- a/os/hal/platforms/STM32/mac_lld.c +++ b/os/hal/platforms/STM32/mac_lld.c @@ -461,7 +461,7 @@ void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) { /* Unlocks the descriptor and returns it to the DMA engine.*/
tdp->physdesc->tdes1 = tdp->offset;
- tdp->physdesc->tdes0 = (STM32_IP_CHECKSUM_OFFLOAD << 22) |
+ tdp->physdesc->tdes0 = STM32_TDES0_CIC(STM32_IP_CHECKSUM_OFFLOAD) |
STM32_TDES0_IC | STM32_TDES0_LS | STM32_TDES0_FS |
STM32_TDES0_TCH | STM32_TDES0_OWN;
diff --git a/os/hal/platforms/STM32/mac_lld.h b/os/hal/platforms/STM32/mac_lld.h index ffb187bba..81050053c 100644 --- a/os/hal/platforms/STM32/mac_lld.h +++ b/os/hal/platforms/STM32/mac_lld.h @@ -84,6 +84,7 @@ #define STM32_TDES0_TTSE 0x02000000
#define STM32_TDES0_LOCKED 0x01000000 /* NOTE: Pseudo flag. */
#define STM32_TDES0_CIC_MASK 0x00C00000
+#define STM32_TDES0_CIC(n) ((n) << 22)
#define STM32_TDES0_TER 0x00200000
#define STM32_TDES0_TCH 0x00100000
#define STM32_TDES0_TTSS 0x00020000
|